Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have a daily AR report that refreshes in PBI. There's two tabs, one to select a specific day, and one that looks at the past x days in a Matrix to see trends. On both tabs I need to be able to review a percentage of multiple columns (i.e. Total Past Due 60+/Total Balance, Total Past Due 120+/Total Balance, etc.). I created two measures to accomplish this, and it is working successfully on the specific day tab.
Measure 1 =
Solved! Go to Solution.
Hi @DJKole
Your table is in a wide layout (separate columns for 61-90, 91-120, 121-180, 180+). My earlier measure assumed a single Bucket column, so that’s why % 180+ was coming out the same for every date.
You can fix this in either of two ways:
Option A (Recommended): Unpivot to a Bucket column
Power Query >> select the 4 aging columns >> Unpivot Columns >> you’ll get:
Then measures:
Total Balance =
SUM ( Query1[Total_Balance] )
Bucket Amount =
SUM ( Query1[Amount] )
Single bucket
% 180+ =
DIVIDE (
CALCULATE ( [Bucket Amount], Query1[Bucket] = "180+" )
[Total Balance]
)
60+ is a rollup of all older buckets
Amount 60+ =
CALCULATE ( [Bucket Amount], Query1[Bucket] IN { "61-90","91-120","121-180","180+" } )
% 60+ =
DIVIDE ( [Amount 60+], [Total Balance] )
This respects the Report_Date on your visual automatically. (If you use a separate Date table, relate Date[Date] >> Query1[Report_Date] and put Date[Date] on Columns.)
Option B (Keep data as-is; no unpivot)
Use the physical columns directly:
Total Balance =
SUM ( Query1[Total_Balance] )
Amount 180+ =
SUM ( Query1[180+] )
% 180+ =
DIVIDE ( [Amount 180+], [Total Balance] )
Amount 60+ =
SUM ( Query1[61-90] )
+ SUM ( Query1[91-120] )
+ SUM ( Query1[121-180] )
+ SUM ( Query1[180+] )
% 60+ =
DIVIDE ( [Amount 60+], [Total Balance] )
Important: Don’t wrap the denominator in ALL()/REMOVEFILTERS() for Date; otherwise you’ll get the same % for every day. Just use plain SUM(...) so the Report_Date filter on the matrix is honored.
Hi @DJKole ,
Thank you @rohit1991 for your inputs.
I hope the information provided is helpful. I wanted to check whether you were able to resolve the issue with the provided solutions. Please let us know if you need any further assistance.
Thank you.
Hi Rohit,
Thanks for the response. I prefer Option B as I only want to show the % for the past due buckets. One issue with your measures, is for 60/120 buckets I need to add additional columns of data. For example, there's a column for 61-90, another for 91-120, 121-180, and 180+. So for the 60+% it would need to be column 61-90 + 91-120 + 121-180 + 180+ / Total Balance as that's the true amount of what's 60+, since it encompasses those other buckets as well.
Nevertheless, your expression should still have worked for the 180+% since that's just a single bucket where we are dividing, yet something did not work. I added your measures above (noting Long_AR = Query 1 the name of my data):
Hi @DJKole ,
Thank you for your update.
Could you please share a sample dataset that reflects your scenario? This will help us accurately reproduce your requirement and provide the most possible solution.
Warm Regards,
Chaithra E.
Hi @v-echaithra below is as a sample of the data set. The last column will update each day with the current date as the new data set is refreshed and brough into PBI
Hi @DJKole
Your table is in a wide layout (separate columns for 61-90, 91-120, 121-180, 180+). My earlier measure assumed a single Bucket column, so that’s why % 180+ was coming out the same for every date.
You can fix this in either of two ways:
Option A (Recommended): Unpivot to a Bucket column
Power Query >> select the 4 aging columns >> Unpivot Columns >> you’ll get:
Then measures:
Total Balance =
SUM ( Query1[Total_Balance] )
Bucket Amount =
SUM ( Query1[Amount] )
Single bucket
% 180+ =
DIVIDE (
CALCULATE ( [Bucket Amount], Query1[Bucket] = "180+" )
[Total Balance]
)
60+ is a rollup of all older buckets
Amount 60+ =
CALCULATE ( [Bucket Amount], Query1[Bucket] IN { "61-90","91-120","121-180","180+" } )
% 60+ =
DIVIDE ( [Amount 60+], [Total Balance] )
This respects the Report_Date on your visual automatically. (If you use a separate Date table, relate Date[Date] >> Query1[Report_Date] and put Date[Date] on Columns.)
Option B (Keep data as-is; no unpivot)
Use the physical columns directly:
Total Balance =
SUM ( Query1[Total_Balance] )
Amount 180+ =
SUM ( Query1[180+] )
% 180+ =
DIVIDE ( [Amount 180+], [Total Balance] )
Amount 60+ =
SUM ( Query1[61-90] )
+ SUM ( Query1[91-120] )
+ SUM ( Query1[121-180] )
+ SUM ( Query1[180+] )
% 60+ =
DIVIDE ( [Amount 60+], [Total Balance] )
Important: Don’t wrap the denominator in ALL()/REMOVEFILTERS() for Date; otherwise you’ll get the same % for every day. Just use plain SUM(...) so the Report_Date filter on the matrix is honored.
Hi @DJKole
You don’t need two completely different sets of measures for “single-day” vs “multi-day” tabs the key is in how you want to display the buckets.
Option A : Using one measure with the Bucket field
If you’re happy to show your buckets dynamically (as rows coming from the data itself), then a single measure is enough:
Amount = SUM ( AR_Long[Amount] )
Total Balance = CALCULATE ( [Amount], REMOVEFILTERS ( AR_Long[Bucket] ) )
% of Total = DIVIDE ( [Amount], [Total Balance] )
Matrix setup
This gives you the top matrix in your screenshot: each bucket shows its % of that date’s total. Works for one date (via slicer) or many dates (trend view).
Option B : Fixed rows with separate measures
If you want rows fixed as “% Current, % 60+, % 120+, % 180+” (instead of pulling them from the Bucket column), then create four individual measures:
% Current =
DIVIDE (
CALCULATE ( [Amount], KEEPFILTERS ( AR_Long[Bucket] = "Current" ) ),
[Total Balance]
)
% 60+ =
DIVIDE (
CALCULATE ( [Amount], KEEPFILTERS ( AR_Long[Bucket] = "60+" ) ),
[Total Balance]
)
% 120+ =
DIVIDE (
CALCULATE ( [Amount], KEEPFILTERS ( AR_Long[Bucket] = "120+" ) ),
[Total Balance]
)
% 180+ =
DIVIDE (
CALCULATE ( [Amount], KEEPFILTERS ( AR_Long[Bucket] = "180+" ) ),
[Total Balance]
)
Matrix setup
This gives you the second matrix in your screenshot, with fixed rows for each bucket.
That’s what makes it work for both single-day and multi-day views: the Date context remains, only the Bucket filter is removed.
So
User | Count |
---|---|
98 | |
76 | |
76 | |
49 | |
27 |