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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JGSingson
Regular Visitor

How to combine two variables measure's from one column using dax.

Hi All, I'm fairly new to the Power BI community, forgive me if I'm doing the posting wrong.

Scenario: 
is it possible to combine one column's different measures? not sure if I am even describing it right but basically I have Cycle below but the issue is Actual and F02-22 (Forecast) is needed to be combined for another measure.

I tried combining both of them using ALLSELECTED in Cycle but when it comes to summing them up it's not working (2nd Picture for reference)

I'm trying to imitate this example below:

JGSingson_5-1659285256861.png

 

JGSingson_4-1659284956991.png
Before combination (Showing Blank):

JGSingson_6-1659285289317.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JGSingson ,

When you select1, The May is showing. When you select 2 or others, the May is not showing. Because the data is blank.

vpollymsft_0-1659491973053.png

vpollymsft_1-1659492005450.png

When you choose different numbers, the different months are shown.

 

What is your desired output?  How about clicking show item with no data? 

vpollymsft_2-1659492192825.png

 

Best Regards

Community Support Team _ Polly

 

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

8 REPLIES 8
Anonymous
Not applicable

Hi @JGSingson ,

When you select1, The May is showing. When you select 2 or others, the May is not showing. Because the data is blank.

vpollymsft_0-1659491973053.png

vpollymsft_1-1659492005450.png

When you choose different numbers, the different months are shown.

 

What is your desired output?  How about clicking show item with no data? 

vpollymsft_2-1659492192825.png

 

Best Regards

Community Support Team _ Polly

 

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

tamerj1
Super User
Super User

Hi @JGSingson 
I guess this will fix your problem https://we.tl/t-f73h88wWR4

TestV = 
CALCULATE (
    [Qty (CActual)],  
    KEEPFILTERS ( 
        DATESINPERIOD ( 
            vw_d_calendar[Transaction Date], 
            MAX ( vw_d_calendar[Transaction Date] ),
            -SELECTEDVALUE(Aggr_Table[No. of Aggregation]), 
            MONTH 
        ) 
    ) 
)

Hi @tamerj1,

Thanks for your help, but the issue is if I try to use "KEEPFILTERS" is that when you try to add them up, for example, change the No. of Aggregation into 2, it won't actually add the months.

EX:
No. Of Aggregation set to "2"
it should be the sum of prev. month and current month ( Problem is April disappears in this example similar to what happens in May ) in the sample file.
Date    | Mar - 22 | Apr - 22 | May - 22 |
Cycle   |  Actual    | Forecast |  Forecast |
Month |     620     |    500     |      400     |
Sum     |     620     |   1120    |       900    |

Cheers,
John

Hi @JGSingson 

I can see you've kudded my reply. Thank you. 
if my reply answered your question please consider marking it as an acceptable solution or otherwise please let me know if you still need any further help. 

tamerj1
Super User
Super User

Hi @JGSingson 

did you try simply summing both measures by creating a third one?

Yeah, I tried to do it, but the issue is because of the Column.[Cycle] it splits Actual and Forecasts into different rows, which eventually would not allow me to do the same thing in Excel. Have headers on corresponding Month-YY

Hi @JGSingson 

would you please sharea sample filesi I can follow up with your description. Thank you

Hi @tamerj1

Sorry for the delay in response it was 2 AM when I was writing the article, here is the sample file.
https://drive.google.com/file/d/1nEbJ411mhpo7L0usxlYqbk9mHNhLKmX_/view?usp=sharing

If you check here on the red squared May is not showing, what I'm trying to do is add the different months depending on the selected No. of Aggregation.

JGSingson_0-1659328765807.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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