The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
HI All,
I am having an Issue to generate this code
there are some syntax error that I cant ping,
Data = SWITCH(TRUE() , MAX(SC[C]) = "Tl",[MTl]
,AND(MAX(SC[]C) = "PR", AND(MAX (SC[s]) = "PR" ), [MPR],
,AND(MAX (SC[C]) = "MPA" , AND(MAX(SC[s]) = "MPA" ), [MPA]
,"")))
any help appriciate it please
Solved! Go to Solution.
Try the following:
Data = SWITCH(TRUE() , MAX(SC[C]) = "Tl",[MTl] ,AND((MAX(SC[C]) = "PR") , (MAX(SC[s]) = "PR" )), [MPR], ,AND((MAX(SC[C]) = "MPA") , (MAX(SC[s]) = "MPA" )), [MPA] ,"")
Try the following:
Data = SWITCH(TRUE() , MAX(SC[C]) = "Tl",[MTl] ,AND((MAX(SC[C]) = "PR") , (MAX(SC[s]) = "PR" )), [MPR], ,AND((MAX(SC[C]) = "MPA") , (MAX(SC[s]) = "MPA" )), [MPA] ,"")
@themistoklisThanks , error gone, cheers
@themistoklis the error is gone but I just came a cross another issue/error:
this above meaure uses multiple measures from other datasets
and on my other meaure which returen stings value I am using
PR = CALCULLATE(SUM(viewName[pq) = "N"]
this is string and I belive cant use CAL SUM?
what would I use ?
and
PR = CALCULATE(COUNT(viewName[A]),viewName[P]) ="N"
first value is numver and second is string
thanks
could anyome help pls?
Hi ,
Yes there are syntax errors in your code but its hard to repair without knowing what you are trying to do,
Could you send some sample data and explain ?