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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
pratafran
Helper III
Helper III

DAX for Grouping table based on atributes and sequential datetime

Hello comunity,

 

I have a calculated table which have details by minute (date + hour + minute) of a machine which is producing or stopped due to X cause.

pratafran_0-1680474485273.png

 

Now I need to show the data groupped by periods of time depending on the Machine/Status/Interruption cause.

I tried to create a matrix and set two columns with the DateTime, one as Earliest and other with Latest but I does not get the result expected since in the above example, I get the minimun and maximun Time for the Working status but without keeping the sequence.

I expect to get the following result

pratafran_1-1680474646628.png

I think that making an index it could make the group as expected but since it is a calculated table I cannot use PowerQuery and have to rely in DAX where I dont know how to proceed.

 

Any ideas?

 

Thanks!

3 REPLIES 3
pratafran
Helper III
Helper III

Any clue on this?

CNENFRNL
Community Champion
Community Champion

Easy enough, simply group the dataset in PQ.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

It is not possible to use PQ since it is a calculated table generated with DAX.

On the other hand, even grouping with SUMMARIZE, I do not get the expected result since it does not take into account the sequence getting This:

pratafran_0-1680493098934.png

instead of this

pratafran_1-1680493145202.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.