Click here to go to the “Simplify to One Measure” dashboard
See below for the posted request. The user was attempting to combine a Calculated Column and a Measure into one Measure. To begin with his formulas did not really work as entered. My solution:
Create 3 measures and use SUMX to total each category. I then added the three measures to a multi row card and turned off the Category Labels to get this result:
AM – 4
PM – 3
FM – 4
AM = CONCATENATE(“AM – “, SUMX(Table1, IF(Hour(Table1[Time]) <=11, 1)))
PM = CONCATENATE(“PM – “, SUMX(Table1, IF(Hour(Table1[Time])>=12 && Hour(Table1[Time])<20, 1)))
FM = CONCATENATE(“FM – “, SUMX(Table1, IF(Hour(Table1[Time])>=20, 1)))
No Calculated Columns needed!
Or if you want one measure, one string:
AM – 4 PM – 3 FM – 4 with a space in between.
All Time Periods = CONCATENATE( [AM] & ” ” & [PM] & ” “, [FM])
Works in a Card with the labels turned off.
User’s Request:
Hi All, I am trying to create a single measure which combines the result of a calculated column with a measure. I have done it with a calculated column and measure but it is required that both logic be in a measure.
Calculated Coumn = IF(Tbl[Time]) <= 11, “AM”, IF(Tbl[Time]) >= 12 && Tbl[Time] < 20 , “PM”, FM)) Measure := CALCULATE(COUNTROWS(Tbl))
The table is as follow:
Time
4/3/2019 1:45
4/4/2019 1:45
4/5/2019 1:45
4/6/2019 1:45
4/3/2019 16:45
4/3/2019 16:45
4/3/2019 16:45
4/3/2019 23:45
4/3/2019 23:45
4/3/2019 23:46
4/3/2019 23:50
I am trying to return a string as a measure that concatenate the label and count into a single measure. It should be similar to the result below:
LabelwithCount
AM – 4
PM – 3
FM – 4
