Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have a model in Power pivot one with so called Keys which is related to my main data (Category,Key,Date, Value)
I have a slicer with months and pivot table which shows Key and calculated values from main table.
I need to show difference between selected month and previous month and I am using those measures
Total = sum(Main[Value])
PreviousMonthTotal = calculate([Total], previousmonth(Main[Date])
It works nice however I need to calculate difference between it and if specific key didnt exist in data for current month it should show previous one and the other way, if its not in current then still show key but with blank.
Unfortunately it shows only keys which exist in month selected on slicer.
if in pivot table I only show grouped values by category results are correct, but when I go to maximum granularity (key) it doesnt show me exact resutlts.
How can I force it to show in pivot table all keys from those two months?
Hi @Werdinkaa ,
We can try to create a seprate dim table first. (keep no relationship with the main table)
CategoryTable = Distinct('Main'[Category])
Then replace the measure total as following to meet your requirement:
Total =
CALCULATE (
SUM ( Main[Value] ),
Main[Category] IN DISTINCT ( CategoryTable[Category] )
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to OneDrive For Business and share the link here.
Best regards,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
24 | |
17 | |
12 | |
12 | |
10 |
User | Count |
---|---|
32 | |
25 | |
16 | |
14 | |
13 |