Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi everyone,
I have a minor problem with my measures. I am currently using two measures that are just simple sums from a table. These are then subtracted which will either give me a positive or negative number. I want to sum all the positive numbers, which I have done, but currently, the total is not working properly, as seen below.
Unanswered Requests= IF(([Allocated Hours]-[Requested Hours])<=0, [Requested Hours]-[Allocated Hours],0)
As you can see the total is 0 when it should be 358.
Hi @Anonymous ,
Do you mind sharing your .pbix file?
I need to check your data model and the formula of [Requested Hours] and [Allocated Hours].
Or refer to the link .
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Lionel,
Can't share the file, but the two measures are just sums of two different columns in the same table.
Hi @Anonymous ,
This problem is very common, but I can not analyze the problem without sample data and formulas. Try to refer to the similar case.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
I tried to replica your scenario at my end. I have created Measure for Unanswered Requested and getting correct result as per input.
Thanks for the reply!
Using your calculation I actually get a total, but it seems to ignore filters and just sum everything?
@Anonymous ,
You have try like
Unanswered Requests= sumx(values(Table[?] ),IF(([Allocated Hours]-[Requested Hours])<=0, [Requested Hours]-[Allocated Hours],0))
where "?" is the column you are grouping on.
example
Unanswered Requests= sumx(values(Table[user]),IF(([Allocated Hours]-[Requested Hours])<=0, [Requested Hours]-[Allocated Hours],0))
Hi,
Thanks for commenting
The problem is that the I cant just sum 1 column as I want the difference between two columns
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
114 | |
100 | |
97 | |
72 | |
68 |