The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi There,
I am attempting to create a multi-filtered calculated measure in Power BI. Something like this:
If Dimension contains Facebook OR Instagram OR Youtube, then sum(Column1), else Column2.
Can someone help me with the DAX required to generate this output?
Solved! Go to Solution.
You want to use the IN operator.
It would basically be something like:
Measure :=
IF (
table[field] IN { "Facebook", "Instagram", "Youtube" },
SUM ( table[field1] ),
SUM ( table[field2] )
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @Anonymous ,
Not sure if you have solved your problem, if not, you can create a calculated column just like @edhans provided. You can refer to the PBIX file or the details
Best Regards
Rena
You want to use the IN operator.
It would basically be something like:
Measure :=
IF (
table[field] IN { "Facebook", "Instagram", "Youtube" },
SUM ( table[field1] ),
SUM ( table[field2] )
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingJoin the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
102 | |
83 | |
63 | |
57 |
User | Count |
---|---|
254 | |
119 | |
115 | |
100 | |
76 |