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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
MRadaci
Regular Visitor

Calculating Differences

Hello, 

 

Pardon my ignorance, but I am in need of some direction/assiatnce. I have a table that I need to calculate the difference of the daily_%_total by column "dialer" (has 2 values, N and U) and column "dt". 

 

Is this possible within Power BI? I have tried filtering, grouping as well as allexcept without any success.

 

Source table:

Table.PNG

 

 

 

 

 

 

 

 

Desired Result:

Desired Result.png

 

 

 

 

 

 

 

 

 

Any assitance is greatly appreciated. 

1 ACCEPTED SOLUTION

Hi @MRadaci,

 

You can try to use below formula to show diff on total level.

Diff =
IF (
    ISFILTERED ( Sheet1[system] ),
    SUM ( Sheet1[daily_%_total] ),
    CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "N" )
        - CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "U" )
)

6.PNG

 

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 @MRadaci,

 

It will be help if you share sample data/pbix file for test.


In addition, if you mean create dynamic column/table from slicer/filter, current power bi not support this, please use measure to instead.

Calculated Column/Table Change Dynamically According to Slicer Selection in the Report.

 

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 Xiaoxin!

 

Thanks for your response. I have attached a sample dataset (xls).

 

The goal is for a sliced date, compare difference in systems (N vs. U) for each category's %.

 Desired Result.png

Thanks for any assitance you can provide.

 

https://github.com/AFC1886/SampleData/blob/master/Example%20Data.xlsx

 

 

 

Hi @MRadaci,

 

You can try to use below formula to show diff on total level.

Diff =
IF (
    ISFILTERED ( Sheet1[system] ),
    SUM ( Sheet1[daily_%_total] ),
    CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "N" )
        - CALCULATE ( SUM ( Sheet1[daily_%_total] ), Sheet1[system] = "U" )
)

6.PNG

 

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

 

I just wanted to say thanks for your assitnace. It was very helpful. What a great community!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.