Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi.
I just wanted to know whether using CALCULATE and DAX, can we create a measure such that a specific column value is ignored.
I have a table called 'Environment Name' and "Quantitiy'.
Environment Table contains names as 'Air','Water' and 'Land'.
I want to create 3 measures each for Air, Water and Land such that the first measure(Air) can have just the values from Water and Land and vice versa.
I have tried doing the same using two DAX queries, but I am not getting a s atisfactory solution.
2 ways which I used to write the query is given below;
1)No Air = CALCULATE(SUM(Purchase[Quantity]),VALUES(Environment[EnvironmentName])<>"Air")
Solved! Go to Solution.
@SanketBhagwat , Try like
CALCULATE(SUM(Purchase[Quantity]),filter(Environment, Environment[EnvironmentName]<>"Air"))
assuming slicer is no filtering the value
else
CALCULATE(SUM(Purchase[Quantity]),filter(all(Environment), Environment[EnvironmentName]<>"Air"))
or
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
if needed check
Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE
@SanketBhagwat , Try like
CALCULATE(SUM(Purchase[Quantity]),filter(Environment, Environment[EnvironmentName]<>"Air"))
assuming slicer is no filtering the value
else
CALCULATE(SUM(Purchase[Quantity]),filter(all(Environment), Environment[EnvironmentName]<>"Air"))
or
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
if needed check
Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE
Hi Amit.
The query
'CALCULATE(SUM(Purchase[Quantity]),filter(Environment, Environment[EnvironmentName]<>"Air"))' worked perfectly fine.
Thanks for the help!
Regards,
Sanket Bhagwat
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |