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
Chanise89
Helper I
Helper I

Combine two measures into a new measure

My apologies if this question seems redundant. But I cant find a solution to my issue. 

 

I have two measures:

Forecast Scenario and Forecast HC (QYear) 

Chanise89_0-1681233102054.png

I need to create two separate meausures from these two columns:

Forecast HC - Prior 

Forecast HC - Current 

 

I know that I can just use the scenario column as a filter but I need to create the measures as they want to see Prior vs Current on a line graph.

 

Please help

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

This pattern should work

Forecast HC - Prior = calculate(sum(Data[Amount]),Data[]="Prior")

Forecast HC - Current = calculate(sum(Data[Amount]),Data[]="Current")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

This pattern should work

Forecast HC - Prior = calculate(sum(Data[Amount]),Data[]="Prior")

Forecast HC - Current = calculate(sum(Data[Amount]),Data[]="Current")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This worked perfectly! Thank you 🙂 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-cgao-msft
Community Support
Community Support

Hi @Chanise89 ,

 

//I have two measures: Forecast Scenario and Forecast HC (QYear) 

It seems that [Forecast Scenario] should be a field in the table, otherwise the table visual should have only one row.

 

Fields/calculated columns can be placed in Legend buckets. Try creating a line chart with the field you need (e.g. month) on the x-axis, the measure [Forecast HC (QYear)] on the y-axis , and 'TableName'[Forecast Scenario] in the Legend, and two lines should appear.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Chanise89
Helper I
Helper I

These two columns are in the same table. I'm just trying to combine these two measure into one. 

I tried concatenate but it doesnt work

Alex_Sawdo
Helper II
Helper II

It depends on how your model/table structure is in this case. Can you share some more details about your data model?

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.