Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Saxon10
Post Prodigy
Post Prodigy

Frequency based on the criteria

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 IDCustomerQty
05/05/202112345Tata1
05/05/202112345Tata2
05/05/202112345Tata34
05/05/202112345Tata5
05/05/20211254Hero8
05/05/20211254Hero9
05/05/20211254Hero10
05/05/20211254Hero11
05/05/20211254Hero12
06/05/202112345Tata1200
06/05/20211254Honda1
06/05/20211254Honda1
06/05/20211254Honda1

 

Saxon10_0-1620678407421.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1620955134700.png

 

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.

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1620955134700.png

 

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. 

Anonymous
Not applicable

To make it clear, can you post the expected output for the above given data?

 

Thanks

Raj

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.