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
pawelj795
Post Prodigy
Post Prodigy

Grouping based on Max_Min Difference

Hi everyone,
I want to group my index list based on the difference between their Max and Min Value.
I can't really figure out why my idea won't work, everything seems fine.
I share below my sample file.
https://drive.google.com/file/d/1-0FFmgcW3ILsubHVMJfe-8z7K_V5bys3/view?usp=sharing

pawelj795_0-1593077360302.png

pawelj795_1-1593077386700.png


Important thing, the grouping must be created in a column, because I want to filter my data by it.

Thanks In advance for any help!

5 REPLIES 5
Anonymous
Not applicable

After a quick look at your model, it seems that your relationship isn't correct. 


You are linking 'IndexList'[ItemID] -> 'IndexList'[ItemID] instead of 'IndexList'[Item Number] -> 'Values'[ITEMID]

 

 

Thanks @Anonymous  for noticing!

It's a dummy mistake, but in my main model that's not the issue, it's something else.

After fixing relationship, it still shows some blank grouping.

pawelj795_0-1593079275649.png

 

Anonymous
Not applicable

I don't see anything that's wrong, I think the measures are working correctly.

But in the dataset you have some infinity values, and the max for bad = 1000000. So ofcourse infinity - Min= infinity   so it's normal that there are some blank values. 

 

@Anonymous 

Thanks again 😉

I finally figured it out.

I should have to add one more column from my model.

Because in the table Value there is also a column with Dates.
And this dates was filtered by page filter.

pawelj795_0-1593084337813.png

So I suppose that this filter doesn't work on measures with function MAX or MIN?

If am I correct, how to add this filtering to my measures?

Maybe my logic was wrong?

That I can't group index by difference between Max and Min value.

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.