Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Getting maximum concurrent license usage only

Dear Team,

 

I have to find out the maximum concurrent license usage in a day. So, if user is selecting a date say 6th Jan 2022, it should show maximum concurrent licenses used that day. 

I am able to find out maximum license usage for each second of selected date i.e. for 86400 rows. But, what i want is only those seconds where concurrent license consumption was maximum.

The mesaure I created for concurrent license usage is 

LicenseUsageSecJob = CALCULATE(COUNT(Jobs[Id]), FILTER(Jobs,
(
(SELECTEDVALUE(DateTimeSec[DateTime]) >= Jobs[StartTime] && SELECTEDVALUE(DateTimeSec[DateTime]) <= Jobs[EndTime])||(SELECTEDVALUE(DateTimeSec[DateTime]) >= Jobs[StartTime] && Jobs[EndTime] = BLANK())
)
)
)

In a table visual I have 2 fields- DateTimeSec[DateTime] and LicenseUsageSecJob

Now this table visual has 86400 rows, if the maximum concurrent licenses used on 6th Jan were 12, I want only those time periods where LicenseUsageSecJob=12.

How to acheive this? Please help me! Its urgent!

 

11 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Use MAXX, so something like:

     

    Maximum Concurrent = 
      MAXX(
        ADDCOLUMNS(
          DISTINCT('DateTimeSec'[DateTime],
          "Concurrent",[LicenseUsageSecJob]
        ),
        [Concurrent]
      )

     

    You could then use the Filter pane or another selector measure to only show the rows where the value is the max.

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      My report looks like this(screenshot above). When the user selects a date the table on right displays the maximum concurrent calls for all the seconds for that day i.e. 86400 rowswhich the table visual is not able to display.

      Now the key ask here is that how to show only those records in table visual which has maximum concurrent calls, it could be 30-40 rows for eg. and not 86400 rows for each second.

       

      Greg_Deckler The measure shared by you when placed with datetime field in a table visual still gives all the seconds rows. Requesting your help!

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous  I think you missed this in the previous post "You could then use the Filter pane or another selector measure to only show the rows where the value is the max." So, try this:

        Maximum Concurrent Flag =
        VAR __Max 
          MAXX(
            ADDCOLUMNS(
              DISTINCT(ALL('DateTimeSec'[DateTime]),
              "Concurrent",[LicenseUsageSecJob]
            ),
            [Concurrent]
          )
        VAR __Count = CALCULATE(COUNT(Jobs[Id]), FILTER(Jobs,(
        (SELECTEDVALUE(DateTimeSec[DateTime]) >= Jobs[StartTime] && SELECTEDVALUE(DateTimeSec[DateTime]) <= Jobs[EndTime])||(SELECTEDVALUE(DateTimeSec[DateTime]) >= Jobs[StartTime] && Jobs[EndTime] = BLANK()))))
        RETURN
        IF(__Count = __Max, __Count,BLANK())