Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
If I have a Card visual with a number on it (let's say 700) that used 3 filters on this visual to get to my '700'...those filters are 'AND' functions correct? Can I write DAX to give me the same number without using filters at all? I'm trying to create Pie Charts with data from 3 cards at a time that all are using filters. It's not working. I'm thinking a "Measure'. Help.
Example: One Card has 700, another 200 and another 100. I want to show 3 pieces totalling 1000. I can't merge Cards on 1 Pie Chart. ???
Solved! Go to Solution.
Hi @Medmanage101 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
You may consider using three MEASURES:
Flag1 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Index]=1),[Value])
Flag2 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Index]=2),[Value])
Flag3 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Index]=3),[Value])
Or use the Switch() function:
All =
SWITCH(
TRUE(),
MAX('Table'[Group])="A",
SUMX(FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Index]=1),[Value]),
MAX('Table'[Group])="B",
SUMX(FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Index]=2),[Value]),
MAX('Table'[Group])="C",
SUMX(FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Index]=3),[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Medmanage101 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
You may consider using three MEASURES:
Flag1 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Index]=1),[Value])
Flag2 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Index]=2),[Value])
Flag3 =
SUMX(
FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Index]=3),[Value])
Or use the Switch() function:
All =
SWITCH(
TRUE(),
MAX('Table'[Group])="A",
SUMX(FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Index]=1),[Value]),
MAX('Table'[Group])="B",
SUMX(FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Index]=2),[Value]),
MAX('Table'[Group])="C",
SUMX(FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Index]=3),[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Medmanage101 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |