The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Dear all,
I wrote an Excel formula that works perfectly fine, but now I do need to transfer it to PBI, writing a new measure, but my attempts by using IF, AND and SELECTEDVALUE do not work. ☹️
Is anybody out there who could "translate" the following Excel formula?
=IF(AND('IObOL new (incl K Group)'[GID (Final Ship to)]= 'IObOL new (incl K Group)'[GID]; 'IObOL new (incl K Group)'[GID (Final Ship to)]= 'IObOL new (incl K Group)'[GID (Final Sold to)];"alle GIDs identisch";
IF('IObOL new (incl K Group)'[GID]= 'IObOL new (incl K Group)'[GID (Final Sold to)];"Order und Sold to identisch";
IF('IObOL new (incl K Group)'[GID (Final Ship to)]= 'IObOL new (incl K Group)'[GID (Sold to)];"Final ship to und Sold to identisch";
IF('IObOL new (incl K Group)'[GID (Final Ship to)]= 'IObOL new (incl K Group)'[GID];"Final ship to und Order identisch";"alle GIDs unterschiedlich"))))
I do not get managed. Hopefully one of you can help me.
Solved! Go to Solution.
Try this measure. I wrapped each column reference in MAX (MIN would work too). If you want this to be a calculated column, remove MAX. A calculated column has the advantage of enabling you to filter on the resulting value.
Measure =
SWITCH (
TRUE,
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID] )
&& MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID (Final Sold to)] ), "alle GIDs identisch",
MAX ( 'IObOL new (incl K Group)'[GID] )
= MAX ( 'IObOL new (incl K Group)'[GID (Final Sold to)] ), "Order und Sold to identisch",
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID (Sold to)] ), "Final ship to und Sold to identisch",
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID] ), "Final ship to und Order identisch",
"alle GIDs unterschiedlich"
)
Proud to be a Super User!
Try this measure. I wrapped each column reference in MAX (MIN would work too). If you want this to be a calculated column, remove MAX. A calculated column has the advantage of enabling you to filter on the resulting value.
Measure =
SWITCH (
TRUE,
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID] )
&& MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID (Final Sold to)] ), "alle GIDs identisch",
MAX ( 'IObOL new (incl K Group)'[GID] )
= MAX ( 'IObOL new (incl K Group)'[GID (Final Sold to)] ), "Order und Sold to identisch",
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID (Sold to)] ), "Final ship to und Sold to identisch",
MAX ( 'IObOL new (incl K Group)'[GID (Final Ship to)] )
= MAX ( 'IObOL new (incl K Group)'[GID] ), "Final ship to und Order identisch",
"alle GIDs unterschiedlich"
)
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
107 | |
75 | |
61 |
User | Count |
---|---|
276 | |
129 | |
122 | |
100 | |
88 |