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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Qazybek
Frequent Visitor

Reverse calculation in DAX

Dear friends,

 

Does somebody know how to realize reverse calculations in DAX?

 

Like this

1 ACCEPTED SOLUTION

HI @Qazybek,

 

There are lot of difference in dax formula between power bi and excel pivot table, some functions only available to excel and some dax functions only works on power bi side.

 

I don't think a complex formula can works well on them at same time. Can you please share a sample file to test?

 

In addition, you can also take a look at following links about circular dependency:

Avoiding circular dependency errors in DAX

Understanding Circular Dependencies in Tabular and PowerPivot

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Qazybek,

 

Did you mean unselected items?  If this is a case, you can use dax formula to get reverse selection items to calculate unselected part.

Sample measure:

measure =
VAR list =
    ALLSELECTED ( Table[Column] )
RETURN
    CALCULATE (
        SUM ( Table[Amount] ),
        FILTER ( ALL ( Table ), NOT ( Table[Column] IN list ) )
    )

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft,

 

Thank you for the reply! Somehow formulas on my Excel sheet disappeared, so I updated the link 🙂

 

I think that I am very close to the final solution but can't get the final calculation. The error is a circular dependency.

Is there any way to make it differently?

HI @Qazybek,

 

There are lot of difference in dax formula between power bi and excel pivot table, some functions only available to excel and some dax functions only works on power bi side.

 

I don't think a complex formula can works well on them at same time. Can you please share a sample file to test?

 

In addition, you can also take a look at following links about circular dependency:

Avoiding circular dependency errors in DAX

Understanding Circular Dependencies in Tabular and PowerPivot

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft,

 

Thank you very much for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.