Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I'm looking for solution how can I create measure which will help me later in filtering.
I'm live connected to transaction database with customer data etc.
I need to create measure(?) with below conditions:
If filtered on 'XYZ' then we should only see:
- number of Activities done one single day and above 20.
- Customers that have more than 200 activities per month
Thanks in advance,
Piotr
Hi @PeterNowak ,
According to your description, I created some data to show:
Here are the steps you can follow:
1. Create calculated column.
Month = MONTH('Table (2)'[Date])
2. Create measure.
Measure =
var _1=CALCULATE(SUM('Table (2)'[amount]),FILTER(ALL('Table (2)'),'Table (2)'[Month]=MAX('Table (2)'[Month])))
return IF(_1>200 && MAX('Table (2)'[amount])>20,_1,BLANK())
3. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PeterNowak Without your specific data model, I can't give specific help, but you can use
&&
to add multiple conditions to an IF() or SWITCH() statement in DAX. https://docs.microsoft.com/en-us/dax/dax-operator-reference#logical-operators
Hopefully that helps point you in the right direction?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
143 | |
121 | |
112 | |
58 | |
57 |