Forum Discussion
Stuznet
Helper V
7 years agoThe expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
Hi all,
I googled it couldn't find the answer. Here is my dax function. Can you guys assist?
So here is the logic. Count rows that match "25%" string from a Percent column
Test = SWITCH(TRUE(),
MAX(data[Month]) = "April",
COUNT(Data[Percent]),FILTER(data,[Percent] = "25%"))
Thanks
Hi, Stuznet
Try this one, please.
Test = SWITCH ( TRUE (), MAX ( data[Month] ) = "April", CALCULATE ( COUNT ( 'Data'[Percent] ), FILTER ( 'data', [Percent] = "25%" ) ) )Best Regards,
Dale
2 Replies
- v-jiascu-msft
Microsoft Employee
Hi, Stuznet
Try this one, please.
Test = SWITCH ( TRUE (), MAX ( data[Month] ) = "April", CALCULATE ( COUNT ( 'Data'[Percent] ), FILTER ( 'data', [Percent] = "25%" ) ) )Best Regards,
Dale- Stuznet
Helper V
v-jiascu-msftExcellent, thank you so much! :)