Forum Discussion
Visual filter from a DAX Sumx filter expression
Hi,
I want to query the number of licences which are active for each week so I can show the increase in licences over time. I have created two date tables as below which work, I suspect there is a better way of doing this but I'm quite new to PBI.
Dates - All Table
Dates - Week/Year Table
Hi Graitec ,
Would you please refer to the measure below:
Number of Active Licences = Sumx(filter(Purchases,Purchases[License Expiry Date]<MAX('Dates - Week/Year'[WeekStartDate])),Purchases[Quantity])Best Regards,
Dedmon Dai
8 Replies
- parry2kSuper User
Graitec seems like Business Unit is a separate table if you add that as a slicer and remove it from your measure, so based on the selected value from the slicer, it will filter the measure. Not sure if I'm missing something here, I don't see why you have fixed value of UK in the measure.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- GraitecRegular Visitor
Thank you for replying.
Yes Business Unit is a related table however the count DAX isn't a measure, it's a column because I want to reply on the count for each week in the past. From what I understand a slicer won't work on a column like this as I need to include the filter in the DAX.
- GraitecRegular Visitor
Because I would like a sum value of licences for each week start date, can I do this with a measure?