Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello community I am learning DAX new recently
I have a question about ignoring a calculation based on the filter criteria
As you can see on the picture the market shares are calculated correctly.
When I select Brand a it shows me 100% but I want it to show me 35% like in the first picture.
I would be very happy about an answer
Solved! Go to Solution.
How about something simpler?
CALCULATE (
SUM ( 'DataTable'[Sales] ),
ALL ( 'DataTable'[Brand] )
)
Hi @ys034
Have you tried Alexis's formula for Grand Total? It should work I think.
Best Regards,
Community Support Team _ Jing
@ys034 , For grand total you might have created a measure
calculate([Measure], allselected())
Use all in place of that
calculate([Measure], all())
or
calculate([Measure], all(TableName))
My Measure:
How about something simpler?
CALCULATE (
SUM ( 'DataTable'[Sales] ),
ALL ( 'DataTable'[Brand] )
)
@ys034 , Try like
Grand Total Sales = CALCULATE(SUMX(VALUES('DataTable'),'DataTable'[Sales]),filter(ALL('DataTable'), 'DataTable'[Date].[Year] = max('DataTable'[Date].[Year])),FILTER(ALLSELECTED('DataTable'),'DataTable'[Country] = MAX('DataTable'[Country])),ALL())
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |