Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JVK
New Member

Facing LOD issues while trying to convert the Tableau calculated fields into PowerBI DAX

 

We are facing LOD issues,

the dax which we are creating is also LOD which in turn is calling LOD itself in the Dax.

Tableau Calculated Field:

NValue=IF [Invoiced Flag] = TRUE and [GR Value Flag] = TRUE
THEN

{FIXED [PO Line - Ref Doc]: SUM([IR-SD Value (LOD) (USD)]) }

ELSEIF
[Invoiced Flag] = FALSE and [GR Value Flag] = TRUE
THEN

{FIXED [PO Line - Ref Doc]: SUM([GR Value (USD)]) }

ELSE 0

END

PowerBI DAX which we tired :

NValue =

VAR InvoicedFlagCount =

    COUNTROWS(FILTER(Append1, Append1[Invoiced Flag Sample] = TRUE()))

VAR GRValueFlagCount =

    COUNTROWS(FILTER(Append1, Append1[GR Value Flag sample] = TRUE()))

RETURN

    SWITCH(

        TRUE(),

        InvoicedFlagCount > 0 && GRValueFlagCount > 0, [Nominal Value IR M],

        InvoicedFlagCount = 0 && GRValueFlagCount > 0, [Nominal Value GR M],

        0  

    )

Tableau result : 7,598,481,586  

PowerBI Result: either   0 or huge value

Based on this DAX we have to create another 2 LOD :

 

 

 Kindly help to find a solution for this issue.

2 REPLIES 2
Anonymous
Not applicable

Hi @JVK 

Please try the following Dax:


NValue =
VAR InvoicedFlag = SELECTEDVALUE(Append1[Invoiced Flag Sample])
VAR GRValueFlag = SELECTEDVALUE(Append1[GR Value Flag sample])
RETURN
    SWITCH(
        TRUE(),
        InvoicedFlag = TRUE() && GRValueFlag = TRUE(),
            CALCULATE(SUM(Append1[IR-SD Value (LOD) (USD)]), ALLEXCEPT(Append1, Append1[PO Line - Ref Doc])),
        InvoicedFlag = FALSE() && GRValueFlag = TRUE(),
            CALCULATE(SUM(Append1[GR Value (USD)]), ALLEXCEPT(Append1, Append1[PO Line - Ref Doc])),
        0
    )

 

  • Variable Definitions:

    • InvoicedFlag : Retrieves the value of [Invoiced Flag] Sample in the current context.
    • GRValueFlag : Retrieves the value of [GR Value Flag] sample in the current context.
  • SWITCH Statement: Returns different calculation results based on conditions.

    • If both InvoicedFlag  and GRValueFlag  are TRUE, it calculates the sum of  [IR-SD Value (LOD) (USD)] at the [PO Line - Ref Doc]  level.
    • If InvoicedFlag is FALSE and GRValueFlag  is TRUE, it calculates the sum [GR Value (USD)] of  at the [PO Line - Ref Doc] level.
    • If none of these conditions are met, it returns 0.

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

There is no solution. Power BI does not support LOD.  You need to bring your own static buckets.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors