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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JulietZhu
Helper IV
Helper IV

Error when DATEDIFF use as filter

I have claim lag calucaited based on datediff between enc_date and final_bill_date.  After  I calculate claim lag, I need count total records for each claim lag range. Below is screenshot for 2 to 7 days. Somebody can point me where I need correct DAX. Thanks

 

Here is the pbix link:  https://1drv.ms/u/s!AlYpYKwSuOKxhGDMTKS188iuqNhu

 

 

Capture.PNG

1 ACCEPTED SOLUTION
tarunsingla
Solution Sage
Solution Sage

Minor fix in the measure:

 

ClaimLag_2-7Days = CALCULATE(COUNT(EncounterCount[ClaimLag]),filter(EncounterCount, EncounterCount[ClaimLag]>=1 && EncounterCount[ClaimLag]<=7))

 

You need to use &&.

 

Regards,

Tarun

View solution in original post

2 REPLIES 2
tarunsingla
Solution Sage
Solution Sage

Minor fix in the measure:

 

ClaimLag_2-7Days = CALCULATE(COUNT(EncounterCount[ClaimLag]),filter(EncounterCount, EncounterCount[ClaimLag]>=1 && EncounterCount[ClaimLag]<=7))

 

You need to use &&.

 

Regards,

Tarun

@tarunsingla , thanks for your reply.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.