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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
cyncyn_98
Frequent Visitor

Dax Measure: Dividing Totals Filtered by Slicers

Hello everyone, 

 

I have been trying to find an article/solution to this, if there is any. 

 

I would like to have a card that shows uses the totals that are filtered by two different slicers, as a dividing measure. And when the slicers are selected by dates abnd month, the values from those two resulting slicers, the dax measure will correctly divide the values. 

 

Example: Below I have a table that shows values that are filtered with a fiscal month slicer. 

cyncyn_98_0-1661199595198.png

 Example 2: And I have a week ending date slicer, that will have change the week number everytime a different date is selected. 

cyncyn_98_1-1661199765424.png

cyncyn_98_2-1661199785602.png

Now with the total from the other table when selected on a month, I would like that total divided by the week number filtered. 

 

Below is the Dax Measure I have now.

Per Week Average GM = DIVIDE( [Adjustment $GM plus Total GM$], SUM('Week Calendar Table'[Week of Month]))

 

Thanks! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cyncyn_98 ,


I guess the slicer containing the [Week end date] field affects the value of the measure [Adjustment ¥ GM plus Total GM$]. You can check it here on the card.

vcgaomsft_0-1661397798687.png

Not sure what the formula is for the measure [adjust $GM plus total GM$], you can try this.

Adjustment $GM plus Total GM$ =
VAR _date_select =
    SELECTEDVALUE ( 'Week Calendar Table'[Week Ending Date] )
VAR _year =
    YEAR ( _date_select )
VAR _month =
    MONTH ( _date_select )
VAR _total =
    CALCULATE (
        SUM ( 'Table'[GM] ),
        FILTER (
            ALL ( 'Week Calendar Table' ),
            'Week Calendar Table'[Year] = _year
                && 'Week Calendar Table'[Month Number] = _month
        )
    )
RETURN
    _total

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @cyncyn_98 ,


I guess the slicer containing the [Week end date] field affects the value of the measure [Adjustment ¥ GM plus Total GM$]. You can check it here on the card.

vcgaomsft_0-1661397798687.png

Not sure what the formula is for the measure [adjust $GM plus total GM$], you can try this.

Adjustment $GM plus Total GM$ =
VAR _date_select =
    SELECTEDVALUE ( 'Week Calendar Table'[Week Ending Date] )
VAR _year =
    YEAR ( _date_select )
VAR _month =
    MONTH ( _date_select )
VAR _total =
    CALCULATE (
        SUM ( 'Table'[GM] ),
        FILTER (
            ALL ( 'Week Calendar Table' ),
            'Week Calendar Table'[Year] = _year
                && 'Week Calendar Table'[Month Number] = _month
        )
    )
RETURN
    _total

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

Thank you! @Anonymous 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.