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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All !
I need a measure for subtotals, using lower level measures, as values for calculations. (This is a big problem that I can not solve for a long time.) See this file pls.
I have a table with sales visits for different dates.
| Date | Superviser | City | TradeAgent |
| 01.01.19 | A | ABC | A1 |
| 02.01.19 | A | ABC | A2 |
| 01.01.19 | A | ABC | A1 |
| 02.01.19 | B | ABC | B1 |
| 01.01.19 | B | ABC | B2 |
| 02.01.19 | B | ABC | B1 |
| 01.01.19 | B | ABC | B1 |
| 03.01.19 | A | ABC | A1 |
| 02.01.19 | A | ABC | A2 |
| 03.01.19 | A | ABC | A1 |
| 01.01.19 | B | ABC | B2 |
| 02.01.19 | B | ABC | B1 |
| 04.01.19 | A | ABC | A1 |
| 05.01.19 | A | ABC | A2 |
| 04.01.19 | A | ABC | A1 |
| 05.01.19 | B | ABC | B1 |
| 01.01.19 | B | ABC | B2 |
| 02.01.19 | B | ABC | B1 |
| 01.01.19 | B | ABC | B1 |
| 02.01.19 | A | ABC | A1 |
| 02.01.19 | A | ABC | A2 |
| 03.01.19 | A | ABC | A1 |
| 01.01.19 | B | ABC | B2 |
| 02.01.19 | B | ABC | B1 |
I need to calculate a call rate plan hierarchy:
call rate plan = isfiltered( [tradeAgent] , distinctcount(date visit) * distinctcount(tradeAgent) * 25 , isfiltered ( [superViser] ,
sum (values lower lvl measure) and etc
Now measure give correct result only for TradeAgent :
call rate plan = distinctcount(date visit) * distinctcount(tradeAgent) * 25
I thought sumx would give the desired result for SuperViser and City, but Sumx gives wrong result (very high results, Why Sumx dont give disitinct (date) and (tradeAgent) i dont know) :
Call rate plan for SuperViser = sumx (disitinctcount(date)*disitinctcount(tradeAgent)*25)
If you have ideas on how to calculate values for the entire hierarchy up to GrandTotal, please share.
When solving this problem, it will be possible to look average sales per visit (for example, for a period of 3 days, there is point A with 3 visits and an order for $ 300 where the average value is 300/3 = 100 $, and point B with 2 visits and order for $ 300 where the average value is 300/2 = 150$, which are included in the ABC zone for it, the measure will count 600 $ /3 (distinct(date))= $ 200, but it will be correct to take the average of the average (100 + 150) / 2 = 125 $ . Very bad that can not work with values in the hierarchy
Solved! Go to Solution.
So basically it sounds like you want the sum of the distinct dates for each agent * 25. The following expression will do that and gives the output you want.
So basically it sounds like you want the sum of the distinct dates for each agent * 25. The following expression will do that and gives the output you want.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!