One of the things I find most interesting about Power BI is that there are often many ways to accomplish the same result. Thus, while I’m sure there is a way to use dynamic segmentation to build this table, I would take a much simpler approach:
- create a measure (e.g., [Aging Category] ) that assigns the proper category from your range table based on the [Aging with Total] measure.
You could do this with nested IF statements, but with four categories in your range table, this will get pretty messy. Instead, it’s a lot cleaner to use a SWITCH ( TRUE() ) construct:
-
Create four new measures, one for each category in your range table, along the lines of:
Total Sales A>30 =
CALCULATE (
IF ( [Aging Category] = “>30”, [Total Sales], BLANK () ),
ALLSELECTED ( DimDate )
)
Then drop those four new measures into your table visual, and you should be good to go. (Note: to get the proper grand totals for each column you may need to use the HASONEVALUE construct we discussed above).
See how this works for you.
- Brian