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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Creating a measure to calculate as per logic..

Rajeeb_mohanty_0-1655207373555.png

 

 

 

If i calculate 1st june then my logic will be count of (1st to 7th) result will show in 1st june ..similarly 2nd june count will be ( 2nd june to 8th june) as per above output table..

i need a measure for this..

Thanks !!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to create a measure by this code.

Measure = 
CALCULATE(COUNT('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[ID]),'Table'[Value]<>BLANK()&&'Table'[DT]>=MAX('Table'[DT])&&'Table'[DT]<=MAX('Table'[DT])+6))

Result is as below.

RicoZhou_0-1655433024457.png

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
Anonymous
Not applicable

@Anonymous Hello,

 

For above image 2nd table result should not be blank, it is counting running date wise.

as per dax if some value is not there againt date , it is showing blank instead of counting ...

 

Anonymous
Not applicable

Thank you so much buddy ...Its helps me a lot....

Anonymous
Not applicable

if anyone trying to this getting any confusion please drop a message here....

Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to create a measure by this code.

Measure = 
CALCULATE(COUNT('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[ID]),'Table'[Value]<>BLANK()&&'Table'[DT]>=MAX('Table'[DT])&&'Table'[DT]<=MAX('Table'[DT])+6))

Result is as below.

RicoZhou_0-1655433024457.png

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors