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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to Sync Slicer to meassure?? (Accumulated Totals)

I want a meassure with accumulated totals to be affected by a Slicer. 

 

Titles_released_acumulated_total =
CALCULATE (
    COUNT ( game_info[Genre] ),
    FILTER (
          ALL (game_info) ,
        game_info[Date2] <= MAX ( game_info[Date2] )
    ),
    game_info[Genre] = "Action"
)
 
Instead of "Action" I want to put there the genre selected in the Slicer. 
 
As you´ll see in the photo.  Even though I selected "Platform" in the Slicer, the meassure still counts for "action" (obviously) but how do I sync it with the slicer? 
As you can see, the meassure in the linegraph is not affected by my filterAs you can see, the meassure in the linegraph is not affected by my filter
1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

The best solution for you is to add a date table to your model and set your date filter by using that table, BTW, try this:

Titles_released_acumulated_total =
VAR _Genre =
    SELECTEDVALUE ( game_info[Genre] )
RETURN
    CALCULATE (
        COUNT ( game_info[Genre] ),
        FILTER (
            ALL ( game_info ),
            game_info[Date2] <= MAX ( game_info[Date2] )
                && game_info[Genre] = _Genre
        )
    )

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @Anonymous 

 

The best solution for you is to add a date table to your model and set your date filter by using that table, BTW, try this:

Titles_released_acumulated_total =
VAR _Genre =
    SELECTEDVALUE ( game_info[Genre] )
RETURN
    CALCULATE (
        COUNT ( game_info[Genre] ),
        FILTER (
            ALL ( game_info ),
            game_info[Date2] <= MAX ( game_info[Date2] )
                && game_info[Genre] = _Genre
        )
    )

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Anonymous
Not applicable

Thank you so much. You saved me.  The code works perfectly. I have a calendar table so I will try to adjust your code for that. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.