March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
How can I do frequence based on the criteria in Power BI using DAX.
I have a data table with information about the sales of products Id by customer with date.
What I`m trying to achieve here - How frequently we deliver the product id to the customer by date.
Data
Date | Product ID | Customer | Qty |
05/05/2021 | 12345 | Tata | 1 |
05/05/2021 | 12345 | Tata | 2 |
05/05/2021 | 12345 | Tata | 34 |
05/05/2021 | 12345 | Tata | 5 |
05/05/2021 | 1254 | Hero | 8 |
05/05/2021 | 1254 | Hero | 9 |
05/05/2021 | 1254 | Hero | 10 |
05/05/2021 | 1254 | Hero | 11 |
05/05/2021 | 1254 | Hero | 12 |
06/05/2021 | 12345 | Tata | 1200 |
06/05/2021 | 1254 | Honda | 1 |
06/05/2021 | 1254 | Honda | 1 |
06/05/2021 | 1254 | Honda | 1 |
Solved! Go to Solution.
Hi @Saxon10 ,
Here are the steps you can follow:
1. Create measure.
Sum =
CALCULATE(SUM('Table'[Qty]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer])&&'Table'[Date]=MAX('Table'[Date])))
2. Result:
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.
Hi @Saxon10 ,
Here are the steps you can follow:
1. Create measure.
Sum =
CALCULATE(SUM('Table'[Qty]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer])&&'Table'[Date]=MAX('Table'[Date])))
2. Result:
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.
Hi,
Thank you so much for and reply.
To make it clear, can you post the expected output for the above given data?
Thanks
Raj
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |