Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I can either use a Categorical Data View Mapping or a Table Mapping, my question is how can I get Total Value of a Measure in my custom visual?
For ex. User has entered Region and Sales. And the data looks like
| Region | Sales |
| North | 30000 |
| South | 20000 |
| East | 15000 |
| West | 45000 |
I just want to calculate the total of the sales. (which should be 110,000). I know I can just iterate over this data and add it but this approach fails when I have percentage related data in Measure. For ex:
| Region | TargetAccomplished |
| North | 80% |
| South | 70% |
| East | 70% |
| West | 80% |
And the total here should be 75% and not 300% (which is what I will get if I am iterating over all the values and summing it up). Let me know if there is anyway to achieve the total if I am using Categorical / Table data view mapping.
Hi @pranshuagrawal ,
In order to give you suitable soltuion, could you please provide the calculation logic which how to get 75% base on your sample data? Thank you.
75%=xxx/xxx+xxx/xxx+...?
Best Regards
try the below,
Total Sales = SUM('Table'[Sales])Sales % =
VAR _Allsales = CALCULATE([Total Sales],ALL('Table'))
return DIVIDE([Total Sales],_Allsales)
Thanks,
Arul
| User | Count |
|---|---|
| 8 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |