Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
10 | |
9 | |
9 |
User | Count |
---|---|
15 | |
12 | |
12 | |
11 | |
11 |