Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
hi,
in Cognos i have a filter that looks like this:
Fact_PO NOT([PO Type] includes ("INT", "IN2") AND [Status] includes ('10','15','31')
In PBI webversion it is apparently not possible to make such filter without using a DAX statement.
So, i have tried:
IF(
COUNTROWS(
FILTER(
FACT PO,
FACT PO[PO TYPE]<> "INT" &&
FACT PO[PO TYPE]<> "IN2" &&
(FACT PO[STATUS]=10 || FACT PO[STATUS]=15 || FACT PO[STATUS]=31)
)
) >0,
1,
0
)
but it is giving issues while executing...
Anyone an idea to solve this??
thanks!!
M
Solved! Go to Solution.
Hi @emveha
please try
Measure =
INT (
ISEMPTY (
FILTER (
'Fact PO',
NOT ( 'Fact PO'[PO Type]
IN { "INT", "IN2" }
&& 'Fact PO'[Status] IN { "10", "15", "31" } )
)
)
)
Hi @emveha
please try
Measure =
INT (
ISEMPTY (
FILTER (
'Fact PO',
NOT ( 'Fact PO'[PO Type]
IN { "INT", "IN2" }
&& 'Fact PO'[Status] IN { "10", "15", "31" } )
)
)
)
hi Tamerj1
thanks for helping out, it seems to be working!!!!
well done.
Mrt
Syntax equivalent
Flag =
1 - CALCULATE(
ISEMPTY( Fact_PO ),
NOT ( Fact_PO[PO Type] IN { "INT", "IN2" } && Fact_PO[Status] IN { 10, 15, 31 } )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
HI,
thanks for the swift response, appreciate it.
unfortunately the proposed statement genereates an error:
syntax or sematic error at line.... Function CONTAINSROW does not support comparing values of type integer with values of type text. Consider using the VALUE or FORMAT function to convert one of the values.
hi @emveha
try like:
HI Freeman,
thanks for your swift response, appreciate it!
Unfortunately i get an error messag: syntax or semantic error: at line.... Too many arguments were passed by the COUNTROWS Function. The maximum argument count for the function is 1.
Any alternatives?
thanks!!
M