cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjavier
Frequent Visitor

count rows per day with measure as a condition

Hi, I am currently developing a report in Power BI desktop, one is a pivot table with the following columns:

Row: StoreCode

Column: Date

Value: Variance (calculated as measure)

 

Apart from that, I want to create a new summary table that will return count of StoreCodes per Date with Variance > x. Is it possible to set measure as a criteria to calculate the count? The report is in direct query mode. 

2 REPLIES 2
Community Support
Community Support

Re: count rows per day with measure as a condition

  Hi @mjavier ,

 

Yes, it is possible to set measure as a criteria to calculate the count. Try to create measure using DAX below.

 

measure1 = CALCULATE(COUNT(Table1[StoreCode]),FILTER(ALLSELECTED(Table1),Table1[Date ]=MAX(Table1[Date ])&&Table1[Variance ]>x))

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Community Support
Community Support

Re: count rows per day with measure as a condition

Hi  @mjavier ,

 

Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors