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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Creating Production Model

In my data model, there are 
1. Monthly Planned Ratio table

2. Monthly Actual Production table

3. Calendar table

 

To know exact conumpstion based on planned ratios, i am using the formula

IO Ratio_CP_CSL =
CALCULATE(
    MAXX(
        Ratio_CSL,
        Ratio_CSL[QTYperDMT]
    ),
    USERELATIONSHIP(
        Ratio_CSL[Month],
        'A. Calendar'[Dates]
    )
)

Now it is working fine as long as any one month is selected in slicer but as soon as multiple months are filtered, it is selecting the maximum value of Ratio from selected month and multiplying it by each month's production.

 

What i want is to get
Jan= Ratio * Production

Feb = Ratio * Production

Multiple Months selected = 
sum (Jan= Ratio * Production + Feb= Ratio * Production)

 

Hope this makes sense. Looking forward to get some guidance on this.

1 REPLY 1
bhelou
Responsive Resident
Responsive Resident

Dear , Kindly share an example if possibile , 

see if this measure works with you : 

Kindly accept as a solution if it works with you and a kudo will be great . 

Regards , 


IO Ratio_CP_CSL =
SUMX (
    VALUES ( 'A. Calendar'[Month] ),
    VAR SelectedMonth = 'A. Calendar'[Month]
    RETURN
        CALCULATE (
            MAXX ( Ratio_CSL, Ratio_CSL[QTYperDMT] ),
            USERELATIONSHIP ( Ratio_CSL[Month], 'A. Calendar'[Dates] ),
            'A. Calendar'[Month] = SelectedMonth
        ) * [Actual Production]
)

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.