Forum Discussion
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:
| Brand | Consented | Period |
| Brand 1 | 100 | 1 |
| Brand 2 | 150 | 1 |
| Brand 3 | 100 | 1 |
| Brand 1 | 250 | 2 |
| Brand 2 | 212 | 2 |
| Brand 3 | 350 | 2 |
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
Community 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.