Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I currently have 3 columns of data:
Location | Identifier Count | No. of cases | Range |
Long stay unit | 1 | 2 | 2-6 |
Long stay unit | 1 | 6 | 2-6 |
Hospital | 2 | 21 | 3-21 |
Hospital | 3 | 4 | 3-21 |
Hospital | 7 | 7 | 3-21 |
Hospital | 1 | 3 | 3-21 |
Hospital | 1 | 13 | 3-21 |
What I'm trying to do is create a measure :IF location/identifier count column HASONEVALUE then find the min and max value of cases and put the ranges into a range column
e.g.
Solved! Go to Solution.
@Niiru1
Your TOTAL NUMBER OF CASEAS ALL is in text format, change. it to whole number
Try the followin measure:
Range3 =
var _loc = MAX(Sheet1[Outbreak location])
var a =
CALCULATE(
MIN(Sheet1[Total number cases - All]),
FILTER(ALLSELECTED(Sheet1),
Sheet1[Outbreak location] = _loc
)
)
var b =
CALCULATE(
max(Sheet1[Total number cases - All]),
FILTER(ALLSELECTED(Sheet1),
Sheet1[Outbreak location] = _loc
)
)
return
IF( HASONEVALUE(Sheet1[Outbreak location]), a&" - "&b)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Niiru1
Your TOTAL NUMBER OF CASEAS ALL is in text format, change. it to whole number
Try the followin measure:
Range3 =
var _loc = MAX(Sheet1[Outbreak location])
var a =
CALCULATE(
MIN(Sheet1[Total number cases - All]),
FILTER(ALLSELECTED(Sheet1),
Sheet1[Outbreak location] = _loc
)
)
var b =
CALCULATE(
max(Sheet1[Total number cases - All]),
FILTER(ALLSELECTED(Sheet1),
Sheet1[Outbreak location] = _loc
)
)
return
IF( HASONEVALUE(Sheet1[Outbreak location]), a&" - "&b)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
98 | |
91 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |