This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
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,
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |