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
Anonymous
Not applicable

conditional calculation based on various column values

Dear team, 

 

Please help me with a solution for problem statement 

 

Date    Parameter   Unit     Value   Reason 

20/6           P1         MW       10         Boiler

20/6           P1         Hours     8          Boiler

20/6           P2         MW       12         Turbine

20/6           P2         Hours     9          Turbine

20/6           P3         MW       11         Boiler

20/6           P3         Hours     9.5        Boiler

 

21/6           P1         MW        9          Boiler

21/6           P1         Hours     8          Boiler

21/6           P2         MW       15         Turbine

21/6           P2         Hours     9          Turbine

21/6           P3         MW       11          Grid

21/6           P3         Hours     9.8        Grid

 

From this, I want to calculate 

 

Measure 1= Boiler MW total (when Reason == Boiler and Unit = MU)  =  10+11+9 = 30

Measure 2= Boiler Hours total (when Reason == Boiler and Unit = Hours)  =  8 + 9.5 +8 = 25.5

 

Measure 3= Turbine MW total (when Reason == Turbine and Unit = MU)  

Measure 4= Turbine Hours  total (when Reason == Turbine and Unit = Hours )  

 

Basically I want to calculate the addition of values when Reason = " " && unit =" " for selected number of dates as per user( in this case 20/6 & 21/6)

 

Please help me!

 

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Let me know if you'd like to get below one:

4.gif

Pbix attached

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Let me know if you'd like to get below one:

4.gif

Pbix attached

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
ryan_mayu
Super User
Super User

@Anonymous 

What's the expected output of your sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.