powerbidaxdashboardbusiness-intelligencemeasure

How to create a measure to get the maximum or minimum value from all the rows from a table in Power BI by filtering a column?


I have a data set as shown uploaded in Power BI. My data source is called node_balance_t.

From this data table, I want to get the max load and min load parameters by filtering column Type and selecting only inflow parameter, and then getting the max and min values by comparing the Value column for all the rows for a particular Node.

While trying to create a measure, I can't select a column from node_balance_t like doing node_balance_t["Type"]? enter image description here

How can this be done by using a measure in Power BI?


Solution

  • I was able to create a Measure using MAXX and MINX functions respectively. Inside these functions, I had to filter the Type column as shown below:

    MinLoad = 
       CALCULATE(
           MINX(
               FILTER(
                   node_balance_t,
                   node_balance_t[Type] = "inflow"
               ),
               node_balance_t[Value]
           )
       )