Forum Discussion
Kr1s
6 years agoFrequent Visitor
SAMEPERIODLASTYEAR with filters
Hi, I have a dataset consisting of all sales from 2016 to present day. There are multiple entries per date broken down by payer, customer, product group and product. Whenever I use SAMEPERIOD...
Pragati11
Super User
6 years agoKr1s
6 years agoFrequent Visitor
- Pragati116 years ago
Super User
Hi Kr1s ,
In the following link I see a way to use SAMEPERIODLASTYEAR dax function with multiple filters.
https://community.powerbi.com/t5/Desktop/DAX-SAMEPERIODLASTYEAR-Filter/td-p/92084
In the above link you see a dax calculation using 2 filters with && operator:
Measure = CALCULATE ( DISTINCTCOUNT ( Sales[DocumentNumber] ); FILTER ( ALL ( Sales ); Sales[Field1] = "1" && Sales[Field2] = VALUE ( 1 ) ); SAMEPERIODLASTYEAR ( Dates[Date] ) )You can try something similar to add more filters here.
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati