Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 Reporting