0
votes

I am attempting to pull a single value by using LOOKUPVALUE and it is doing so, but instead of returning the value, which is a decimal, it is rounding up to the nearest whole number.

Here's the code that I've tried and and example table of my data set.

Measure = 
LOOKUPVALUE(
    'Monthly Values'[Requested Value],
    [Month Num],
    MONTH(TODAY())
)

To be clear, [Month Num] is the Month in numerical form so January = 1, Feb. = 2, etc.

Here is an example table:

Month         Irrelevant    Month Num   Requested Value
1/1/2019    6584651         1           2.48
2/1/2019    6516516         2           2.36
3/1/2019    3464            3           3.32
4/1/2019    6584814         4           2.72

Requested Value is formatted as a "Decimal Number" and limited to 2 decimal places. Also before someone asks, I have double checked the Measure to ensure the measure's formatting is also set to "Decimal Number" with 2 decimal places.

For this case the month is 4 and the formula should spit out "2.72" but instead is spitting out "3".

Is there a way to get around the rounding with LOOKUPVALUE? Alternatively is there another way to lookup this value which would not round the returning value?

2
Can't reproduce this behaviour, with that sample data and measure. Post a PBIX file?Olly

2 Answers

0
votes

I just had the same problem. What I did was to change the data type to decimal in the Power Query, then load the data to Data model (simply refresh the data).

Mine is fixed now.

0
votes

Use following dax

Measure = FIXED(
    LOOKUPVALUE(
        'Monthly Values'[Requested Value],[Month Num],MONTH(TODAY())
    ),
2)