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
newgirl
Post Patron
Post Patron

Minimum for ALL

I have this sample dataset:

DateIDStep 1Step 2Step 3YearMonth

1/1/20241311202401
1/1/20242231202401
1/2/20243321202401
1/5/20244012202401
2/10/20245311202402
2/20/20246331

202402

 

and the following measures:

 

 

Step1_Average = AVERAGE(Requests[Step 1])
Step1_MIN = 
var _SummarizedTable = ADDCOLUMNS(SUMMARIZE(Requests,Requests[YearMonth]),"_X", [Step1_Average])
RETURN MINX(_SummarizedTable,[_X])

 

 

 

Here's the matrix I have:

Reality:

newgirl_2-1728612939571.png

 

 

 

Step1_MIN is supposed to get the MINIMUM from month-level only. It works, because it displays 2.00 when I put it in a spearate visual. But now, how to show the value as repeating, regardless of its row fields? I need it like that because I'm going to use it for a new measure.

 

I've tried using ALL in the Step1_MIN, but it says it only accepts table reference (not table expression). I've tried using CALCULATE + ALL as a new line Step 1_MIN but it says I could only use columns from the same table.

 

 

Expectation:

newgirl_1-1728612887624.png

 

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @newgirl 
Firstly, it is recommended to disable the automatic date hierarchies and create a calendar table that is connected to your transactions table.
This will allow for much more efficient and flexible work.

Ritaf1983_0-1728615091381.pngRitaf1983_1-1728615113803.pngRitaf1983_2-1728615131762.png

After you have this model you can use the formulas :

step1_avg = AVERAGE('Table'[Step 1])
and for minimum months average :
min_average =
 if([step1_avg]<>BLANK(),CALCULATE(
Minx(SUMMARIZE(VALUES(caledar[monthYear]),caledar[monthYear],"_x",[step1_avg]),[_x]),ALLSELECTED('caledar')),BLANK())
Result:
Ritaf1983_3-1728615243448.png

The pbix is attached

more information about creating date table here :
https://iterationinsights.com/article/how-to-create-a-date-table-in-power-bi/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @newgirl 
Firstly, it is recommended to disable the automatic date hierarchies and create a calendar table that is connected to your transactions table.
This will allow for much more efficient and flexible work.

Ritaf1983_0-1728615091381.pngRitaf1983_1-1728615113803.pngRitaf1983_2-1728615131762.png

After you have this model you can use the formulas :

step1_avg = AVERAGE('Table'[Step 1])
and for minimum months average :
min_average =
 if([step1_avg]<>BLANK(),CALCULATE(
Minx(SUMMARIZE(VALUES(caledar[monthYear]),caledar[monthYear],"_x",[step1_avg]),[_x]),ALLSELECTED('caledar')),BLANK())
Result:
Ritaf1983_3-1728615243448.png

The pbix is attached

more information about creating date table here :
https://iterationinsights.com/article/how-to-create-a-date-table-in-power-bi/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.