Forum Discussion
DAX for column total
- 6 years ago
Here is how you can do this one.
First, add an index to your TblYear table so you can use it as a Sort By Column to get All Years to show before the years.
Then use this measure.
NewMeasure =
VAR thisyeartotal =
SUM ( Facts[Amount] )
RETURN
IF (
ISBLANK ( thisyeartotal ),
CALCULATE ( SUM ( Facts[Amount] ), ALL ( TblYear ) ),
thisyeartotal
)If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
HI hcze ,
You can remove 'All Years' from your Year Table.
This is how your model will look.
In the slicer you have an option to Select All. Use that option incase you want to get the values of All Years.
Use values from the different tables to show in a Matrix.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous it was to have total column as first column. Unless you have other trick to get there?