Forum Discussion
Aging Group based on dateslicer
Hi!
New day, new challenge;) @v-kelly-msft
My goal:
When i change the date slicer to a specific date, i need the data to show the amount outstanding, on that point, historical. I got that to work with these 3 measures;
1. selected date = MAXX(KEEPFILTERS(VALUES('Calendar'[Date])),CALCULATE(MAX('Calendar'[Date])))
- Anonymous6 years ago
Hi!
I found the solution I needed in this video --> https://www.youtube.com/watch?v=5_KDJGPjMnI
Thanks for al the help!
12 Replies
- AnonymousNot applicable
hi Anonymous
you cannot create calculated column for this requirement. Measures will show only the summarized data unless we add rows to the table visual like (invoice date, due time, etc). I suggest you to create measures seperately for due< 30 days , due 90 -180, due 180-365, due >365. Then you can visualize like below
for ex:
due time due<30 due 90-180 due 180-365 due >365
total amount
(on selected date) 351 256 1246 27
- AnonymousNot applicable
Hi! tried that also, but the amount is the same in every column. Because the aging days is zero, only when I add InvoiceDate the table expands and shows the correct aging days per row. Maybe you know why?
Due < 30 days = CALCULATE([SD invoice amount outstanding],FILTER(MeasureTable, [SD invoice Aging Days] >= 1 && [SD invoice Aging Days] < 30))Due >365 days = CALCULATE([SD invoice amount outstanding],FILTER(MeasureTable,[SD invoice Aging Days] > 365))- AnonymousNot applicable
Anonymous
use DateDiff function to calculate difference of days between the minimum date and the selected date on slicer.
datediff = DATEDIFF(MINX('table1','table1'[Invoice Date]),CALCULATE(MAX('table1'[Invoice Date]),ALLSELECTED('Invoice Date')),DAY)+1calculate ageing in seperate measures.<30 = IF([datediff]<=30,SUM('Table1'[SD Invoice Amount Outstanding]),0)\30 to 365 = IF([datediff]>=31 && [datediff]<=365,SUM('Table1'[SD Invoice Amount Outstanding]),0)>365 = IF([datediff]>365,SUM('Table1'[SD Invoice Amount Outstanding]),0)finally sum all rows corresponding to ageing daysDue < 30 days = SUMX('Table1','Table1'[<30])Due 30 to 365 days = SUMX('Table1','Table1'[30 to 365])Due > 365 days = SUMX('Table1','Table1'[>365])try this, the above as measuresdrag Due < 30 days, Due 30 to 365 days, Due > 365 days these meausres as columns to the table visual.
- FarhanAhmedCommunity Champion
Unfortunately you cannot create Dynamic Column Value because Computed Column is pre-calculated. You would require a Measure to make it dynamic
- AnonymousNot applicable
Yes, i know. I already made a measure, and it shows the correct data..but only in a table with the field (dimension) Invoice_date. When I remove Invoice_date all rows collapse to 1 row, also the aging groups.
- amitchandakSuper User
Anonymous , did not get it completely. see if bining can help
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization - v-lili6-msftCommunity Support
hi Anonymous
This is a common Dynamic Segmentation problem, you could refer to these three blogs to get it:
https://www.daxpatterns.com/dynamic-segmentation/
https://powerbi.tips/2016/04/power-bi-histogram-with-bins/
https://powerpivotpro.com/2015/03/creating-a-histogram-with-a-user-defined-number-of-buckets/
Regards,
Lin
- AnonymousNot applicable
Hi!
I found the solution I needed in this video --> https://www.youtube.com/watch?v=5_KDJGPjMnI
Thanks for al the help!