Forum Discussion

RavM's avatar
RavM
New Member
3 years ago
Solved

Show last period values when no slicer selected

Hi,

 

I am currently reporting on our email consented community, which when the period slicer is selected is fine however when I clear the slicer, I get the sum of all periods. Rather than get the sum of all periods, is there a way to only show the latest period results? Below is an example:

 

BrandConsentedPeriod
Brand 11001
Brand 21501
Brand 31001
Brand 12502
Brand 22122
Brand 33502

 

For brand 1, when no slicer is selected, rather than see (P1 100 + P2 250) 350, I only want to see 250 which is the latest view. The sum of this field is irrelvant. Any help on this is greatly appreciated.

 

My data is set as follows:

 

Email Consent Table

*Brand

*Consented

*Period

 

Calendar Table

*Date

*Period

 

Thanking you all in advance.

 

  • Hi, RavM ;

    You could create a new table then create a measure.

    1.create a table by dax as a slicer.

    new = VALUES('Table'[Brand])

    2.then create a measure.

    Measure = IF(ISFILTERED('new'[Brand]),
    CALCULATE(SUM('Table'[Consented]),FILTER('Table',[Brand] in VALUES(new[Brand]))), 
    CALCULATE(SUM('Table'[Consented]),FILTER('Table',[Period]=CALCULATE(MAX('Table'[Period]),ALLEXCEPT('Table','Table'[Brand])))))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, RavM ;

    You could create a new table then create a measure.

    1.create a table by dax as a slicer.

    new = VALUES('Table'[Brand])

    2.then create a measure.

    Measure = IF(ISFILTERED('new'[Brand]),
    CALCULATE(SUM('Table'[Consented]),FILTER('Table',[Brand] in VALUES(new[Brand]))), 
    CALCULATE(SUM('Table'[Consented]),FILTER('Table',[Period]=CALCULATE(MAX('Table'[Period]),ALLEXCEPT('Table','Table'[Brand])))))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.