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 also need help with a clustered column graph. I want to be able to compare the week that is being selected by the slicer with the previous week so for example if the slicer is week 32 then I want the column graph to display week 32 and week 31 costs. Please help
Solved! Go to Solution.
Hi@ sdas028
After my research, You can try to follow my steps like below:
Step 1:
Add a measure that contains last week costs
Last week = VAR currWeek = MAX ( StoreSales[Week id] ) RETURN CALCULATE ( SUM(StoreSales[costs]), FILTER ( ALL( StoreSales ), StoreSales[Week id] IN GENERATESERIES ( MAX ( currWeek - 1, 1 ), currWeek-1, 1 )
Step 2:
Add filed costs and measure Last week into Value of column chart and week into Axis
Result:
For example
After select week4
Here is DEMO, please try it.
Best Regards,
Lin
Hi@ sdas028
After my research, You can try to follow my steps like below:
Step 1:
Add a measure that contains last week costs
Last week = VAR currWeek = MAX ( StoreSales[Week id] ) RETURN CALCULATE ( SUM(StoreSales[costs]), FILTER ( ALL( StoreSales ), StoreSales[Week id] IN GENERATESERIES ( MAX ( currWeek - 1, 1 ), currWeek-1, 1 )
Step 2:
Add filed costs and measure Last week into Value of column chart and week into Axis
Result:
For example
After select week4
Here is DEMO, please try it.
Best Regards,
Lin
Hi Lin,
Thanks for that, I figured out how to do it by adding in "This Week" and "Last Week" to the week dimension I had and then applying a filter for those labels and then a slicre for them also.
Thanks,
Sophie
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |