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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

multiply two columns with different date

Hello, I have two columns. One column is based on the last month value and another one is based on next month value. 

I want to multiply these two coulmns and sort it based on the current date. 

Do you have any solution? 

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Is your "12 month Retention rate for 202302" from another source table or in the same source table as "Total Crew Needed"? Anyway you need to create a measure to get the last month's Retention rate.

 

Assume that your [Date] column in the matrix visual is from 'Table1' and that your "12 month Retention rate" is from a table 'Table2' which has a month column (with month value like 202302), you can create a measure similar to below:

last month rate =
VAR _lastMonth =
    YEAR ( EOMONTH ( MAX ( 'Table1'[Date] ), -1 ) ) * 100 + MONTH ( EOMONTH ( MAX ( 'Table1'[Date] ), -1 ) )
RETURN
    CALCULATE (
        MAX ( 'Table2'[Retention rate] ),
        ALL ( 'Table2' ),
        'Table2'[Month] = _lastMonth
    )

Add this measure to the matrix visual to check whether it gets the retention rate of last month correctly. Then you can create another measure to multiply it to "Total Crew Needed".

Measure = [last month rate] * SUM ( 'Table'[Total Crew Needed] )

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

 

somivahabi_3-1679911581017.jpeg

 

I want multiply "12 month Retention rate for 202302" into "Total Crew Needed", But as you can see, there is no data for "12 month Retention rate for 202302" , since they are for another date (last month).

Hi @Anonymous 

 

Is your "12 month Retention rate for 202302" from another source table or in the same source table as "Total Crew Needed"? Anyway you need to create a measure to get the last month's Retention rate.

 

Assume that your [Date] column in the matrix visual is from 'Table1' and that your "12 month Retention rate" is from a table 'Table2' which has a month column (with month value like 202302), you can create a measure similar to below:

last month rate =
VAR _lastMonth =
    YEAR ( EOMONTH ( MAX ( 'Table1'[Date] ), -1 ) ) * 100 + MONTH ( EOMONTH ( MAX ( 'Table1'[Date] ), -1 ) )
RETURN
    CALCULATE (
        MAX ( 'Table2'[Retention rate] ),
        ALL ( 'Table2' ),
        'Table2'[Month] = _lastMonth
    )

Add this measure to the matrix visual to check whether it gets the retention rate of last month correctly. Then you can create another measure to multiply it to "Total Crew Needed".

Measure = [last month rate] * SUM ( 'Table'[Total Crew Needed] )

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

andrewpirie
Resolver II
Resolver II

Could you show a few rows of a sample dataset, and the resulting dataset you're trying to achieve? I have a couple of things I'm not clear on, and a sample could help with this.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors