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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Justas4478
Post Prodigy
Post Prodigy

Creating group by measure using existing measure

Hi, I have this measure which count shorted qty and gives number of days item was shorted.

Days Shorted = VAR _Table =
    SUMMARIZE(
         'Outbound Delivery',
         'Product Category'[Level 2],
         'Date'[Date],
         "@Shorted", 'Outbound Delivery'[Shorted Qty]
    )
VAR _Result =
    COUNTX(
        FILTER(
             _Table,
              [@Shorted] <> 0
        ),
        [@Shorted]
    )
RETURN
  _Result 
Problem is that withou further grouping this data is not that usefull.
I would be abel to do it if it were calculated column.
But unfortunatelly for me we are using live connection model, so I can only create measures.
This is sample of the data that I have:
Justas4478_0-1714384321283.png

And I trying to group 'Days Shorted' into six groups. These are the groups:

Justas4478_1-1714384418781.png

And this is expected result based on sample data:

Justas4478_2-1714384505198.png

I attached sample data.
https://we.tl/t-fT2YKclDaE 

If there is need for larger data sample I can provide it.

1 REPLY 1
MFelix
Super User
Super User

Hi @Justas4478 ,

 

since you are in live connection you need to create a measure for each of your calculation try to add a measure for each of your calculations:

 

1 days = 
        VAR temp_table = SUMMARIZE(
			'Outbound Delivery',
			'Outbound Delivery'[Gate/Floor],
			'Outbound Delivery'[SKU Number],
			"Days", [Days Shorted]
		)
		RETURN

			COUNTROWS(FILTER(
				temp_table,
				[Days] = 1
			)

			)

 Just replace the 1 by the number of days you need and then on the matrix visualization put values on rows:

MFelix_0-1714406256533.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.