Measures Total not Summing

PShingadia

New Member
Joined
Aug 5, 2015
Messages
47
Hi All:

I am relatively new to DAX and having issues arriving at a total for a measure. The measure is:

Result:=DIVIDE([Value], [Factor])

[Value] and [Factor] are two measures calculated in the model and work fine and trying to achieve Result by dividing one by the other. Result total shows at 221 with row context applying but need it to show actual sum which is 59.



ValueFactorResult
- 260.97 -
190 31.66 6
2 5.91 0
14 14.71 1
14 0.29 49
1 0.38 3
Total 221 1.00 221

<tbody>
</tbody>


Thanks in advance for any help
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Is that literally how your output table looks? Nothing in the rows section? If so and each of the lines in your data are like the above then you want something like this.

Code:
Output:=
SUMX (
    Table,
    [Result]
)

If you do have something in the rows section, say it is 'Category' then you want the following instead:

Code:
Output:=
SUMX (
    VALUES ( Table[Category] ),
    [Result]
)
 
Upvote 0
gazpage:

Thanks for the quick reply. Have spent nearly a day trying to solve this so at wits end!

I tried your suggestion but it returns blank as an answer and don't understand why. These are all measures - not sure if that makes any difference.
 
Upvote 0
gazpage:

Sorted out the blank issue. I was selecting wrong 'Category' in my table but when I changed to another column then your suggestion did produce a total.

However this measure is drives a pivot table and slicer on a dashboard. Is there a way to allow this selected 'Category' column in the DAX formula to be dynamic so the column changes as the user selects different items on the slicer?

Thanks again and owe you big for help already!!
 
Upvote 0
This is a big weakness in Power BI in my opinion, probably the most glaring omission in my opinion. See below for a work around.

http://leanx.eu/tutorials/dynamic-dimensions-in-power-bi

<strike></strike>Otherwise you can do it via bookmarking, basically create multiple charts, one for each category. Then use the bookmarks to only show which ever graph you want currently.
 
Upvote 0
I had a feeling this was the case hence spending all day on finding a solution. Looks like I may have to create a different measure for each option.

Appreciate the help today - thanks!!!
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top