Forum Discussion

ismail95's avatar
ismail95
Frequent Visitor
2 years ago
Solved

Summing a Column by Grouping by another column and creating conditions

Hi, I try to create the meausure/ table below, and need your help. I want to sum Assessment column grouping by Task Name. After that I will compare Sum of Assessments with the tasks threshold ( logic provided below)
  • Hi, ismail95 

    try below measure for logical test

    drag your task and assessment column to table visual and add below measure

     

    Measure = 
    SWITCH(TRUE(),
    MIN(assessment[task])="a" && SUM(assessment[assessment])>5,1,
    MIN(assessment[task])="b" && SUM(assessment[assessment])>3,1,
    MIN(assessment[task])="c" && SUM(assessment[assessment])>6,1,0)

     

     

     

     

1 Reply

  • Dangar332's avatar
    Dangar332
    Icon for Resident Rockstar rankResident Rockstar

    Hi, ismail95 

    try below measure for logical test

    drag your task and assessment column to table visual and add below measure

     

    Measure = 
    SWITCH(TRUE(),
    MIN(assessment[task])="a" && SUM(assessment[assessment])>5,1,
    MIN(assessment[task])="b" && SUM(assessment[assessment])>3,1,
    MIN(assessment[task])="c" && SUM(assessment[assessment])>6,1,0)