Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I am trying to show the % of total sales that are made Product Revenue but keep getting an error or incorrect value when I try it.
2020 Sales | Sales Code |
$45 | Advertising |
$300 | Product Revenue |
$5 | Service Fees |
$65 | Advertising |
$35 | Other |
Product Revenue % ($300) / Total Revenue ($450) = 66.7%
Solved! Go to Solution.
Hi @Pyrofenix
Create a measure
Measure = CALCULATE(SUM(Sheet8[2020 Sales]),FILTER(Sheet8,Sheet8[Sales Code]="Product Revenue"))/CALCULATE(SUM(Sheet8[2020 Sales]),ALLSELECTED(Sheet8))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Pyrofenix
Create a measure
Measure = CALCULATE(SUM(Sheet8[2020 Sales]),FILTER(Sheet8,Sheet8[Sales Code]="Product Revenue"))/CALCULATE(SUM(Sheet8[2020 Sales]),ALLSELECTED(Sheet8))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You want somethings along the lines of this. The ALL() in the denominator tells it to ignore all filters and get the entire total.
% of Total =
VAR CurrentSales =
SUM( Table[Sales] )
VAR TotalSales =
SUMX(
ALL( Table ),
Table[Sales]
)
VAR Result =
DIVIDE(
CurrentSales,
TotalSales,
0
)
RETURN
Result
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |