Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I have an ordinary table with dates (by months) and sames.
I am trying to build a report that would show the following 3 sales values in one table/chart when the date "August 2019" is selected in the slicer:
- sum for year 2017
- sum for year 2018
- sum of Sept 2019 till August 2019.
I understand that I can do three separate measures to get each value, but then the measure would not have the year number in it's name. So i could do "Sales for year before previous" "Sames for previous year" and " Last R12 months", but I need the names to be "2017", "2018" and "R12M"
My question is: is there a workaround to get all three values (sum of 2017, 2018 and R12M) in one table with current names (i.e. year number as the measure name)? Or I understand that currently there is no way of doing so (I cannot define dynamic measure names) so I just have to come to terms and use generic measure names?
BR!
Solved! Go to Solution.
Hi @PBIacc721 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PBIacc721 ,
Although the measure name cannot be dynamic, we can provide a workaround here, Create a measure to get the value depends on the filter on year.
sum for year = IF ( HASONEFILTER ( 'Table'[Date].[Year] ), CALCULATE ( SUM ( 'Table'[Value] ) ), CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] >= TODAY () - 365 ) ) )
And create another measure to show the name.
name measure = IF ( HASONEFILTER ( 'Table'[Date].[Year] ), "sum for year " & SELECTEDVALUE ( 'Table'[Date].[Year] ), "sum for year R12M" )
Create a card visual to put the name measure, hide title of card visual, adjust the font size and color.
Then you can use the value measure to create visual, paint the value measure name as the white to hide it, put the name measure into the same place.
But unfortunately for table visual it can not paint signel column name as white, this workaround can only paint all the colmn header white and use multi measures to replace the header for dynamic effect.
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |