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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
reportsgroup
Frequent Visitor

compare daily value with max value across week in table power bi

hello and help. i need to get max request across date range. the date range is set by slicer.

i used this dax for getting max request

max_requested = MAXX(VALUES(table[date]), [request])
 
in visual card shown like this :
 
max_requested = 20

 

when i try to get in table form to see like capacity utilization. it becomes like this

daterequestmax requestcapacity util.

1/1/2020

1010100%
2/1/20202020100%

 

how can i get it like this?

daterequestmax requestcapacity util.

1/1/2020

102050%
2/1/20202020100%

 

thank you very much for help given

1 ACCEPTED SOLUTION
reportsgroup
Frequent Visitor

got the solution for it

thank you for your help @amitchandak 
thanks to @Greg_Deckler . your article was heloful in getting this measure.

max_requested_2 =

var _max =
MAXX(
  FILTER(
    summarize(
      ALLEXCEPT(
        table,
        table[external slicer that im using] - everything else not including the date
        ),
     table[date],
     "_request", [request]),
 table[date] > TODAY() - 30),
[_request])
return
_max

got it to show the max request made in a day, for past 30 days. after that i just use the same measure with this new fixed measure.

View solution in original post

5 REPLIES 5
reportsgroup
Frequent Visitor

got the solution for it

thank you for your help @amitchandak 
thanks to @Greg_Deckler . your article was heloful in getting this measure.

max_requested_2 =

var _max =
MAXX(
  FILTER(
    summarize(
      ALLEXCEPT(
        table,
        table[external slicer that im using] - everything else not including the date
        ),
     table[date],
     "_request", [request]),
 table[date] > TODAY() - 30),
[_request])
return
_max

got it to show the max request made in a day, for past 30 days. after that i just use the same measure with this new fixed measure.
amitchandak
Super User
Super User

@reportsgroup ,

Try measures

 

measure =
var _max = MAXX(VALUES(table[date]), [request])
return
divide([request],_max)

 

or

 

 

measure =
var _max = MAXX(summarize(table,table[date],"_1", [request]),[_1])
return
divide([request],_max)

@amitchandak 

Hi amit, i tried both measure that u send. it doesnt work. the _max still got tied back to the request date when i put it in table visual.

the _max is the request made in that day not max request across certain date range.
making the capacity utilization still 100%

Greg_Deckler
Super User
Super User

@reportsgroup  If those are both measures, just create a new measure and divide the 2 other measures? Sorry, not very clear to me what is going on.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

the raw table is just rows of request with distinct id and date for when its created

measure 1 - distinct count of request
measure 2 - max request in a day based on certain date range
measure 3 - capacity utilization. the idea is want to check if we are fully utilizing our max capacity of a request to come in a day

but issue is measure 2 not showing properly when place in table visual. because it becomes tied to the specific date. when it supposed to consider date range. showing the daily request instead

saw one of your solution of getting sum ignoring row context. https://community.powerbi.com/t5/Desktop/MAKE-SUM-IGNORE-ROW-CONTEXT/m-p/637140#M304913

in this case i want to get max ignoring the row context which is the date. is this applicable to mine?
im still trying to see if it can work like so

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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