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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

count data between date hours (24 hrs, 48 hrs etc)

Hi

 

Capture3.PNG

 

How to write DAX Expression above example, Requirement is " based on Name(A,B,C) between date hours-  below 24 hrs same day, above 24 hrs - below 48 hrs display (24hrs) etc... dsiplay the count of numbers?

 

Thanks

Kunuthuri

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use DATEDIFF Function and SWITCH Function to add a calculated column.

https://community.powerbi.com/t5/Desktop/Get-Last-6-months-And-Next-6-months-from-current-month/m-p/199136#M87611

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi

 

Thanks to reply

 

The query link you send working fine, but when we taking to matrix visual . Which data drag to Rows, Columns and values. Can you please assist it.

 

Capture3.PNG

 

Thanks

kunuthuri

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.