Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi All,
Need your help to resolve one logic on dax.
Trying on DAX as below but getting error -"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value"
SWITCH( TRUE(), FILTER(OSMS_Recomit, OSMS_Recomit[OSMaterialRecoveryDate] = EARLIER(OSMS_Recomit[OSMaterialRecoveryDate])), "Same", FILTER(OSMS_Recomit, OSMS_Recomit[OSMaterialRecoveryDate] > EARLIER(OSMS_Recomit[OSMaterialRecoveryDate])),"Pushout", FILTER(OSMS_Recomit, OSMS_Recomit[OSMaterialRecoveryDate] < EARLIER(OSMS_Recomit[OSMaterialRecoveryDate])),"PullIn","NA" )
Hi Matt,
Thanks for your reply,
Suppose the IF condition, The below logic is not realted to DAX function, only explaing the logic that How can implement on DAX
If(OSMaterialRecoveryDate = Previous(OSMaterialRecoveryDate), "Same",
If(OSMaterialRecoveryDate > Previous(OSMaterialRecoveryDate), "Pushout",
If(OSMaterialRecoveryDate < Previous(OSMaterialRecoveryDate), "Pullin","NA")))
Hi @Fsciencetech ,
Use the followng measure based on your logic:
SWITCH(True(),OSMaterialRecoveryDate = Previous(OSMaterialRecoveryDate, "Same",
OSMaterialRecoveryDate > Previous(OSMaterialRecoveryDate), "Pushout",
OSMaterialRecoveryDate < Previous(OSMaterialRecoveryDate), "Pullin","NA")))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
What do you mean by "Previous"? What are you trying to do? What tables and relationships do you have?
the formula looks fundamentally flawed to me. Lines 4-8 (the filter) return a table. But you are using switch true, so this section must return a true/false expression, not a table. The same applies to the other sections.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 40 | |
| 36 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 38 | |
| 35 | |
| 23 |