Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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 ?