Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a dataset...... simplified here:
Case Number | Assistance | |||
1 | 1/1/2023 | Rent | ||
1 | 1/1/2023 | Util | ||
2 | 1/1/2023 | Rent | ||
2 | 1/1/2023 | Rent | ||
3 | 1/1/2023 | Util | ||
3 | 1/1/2023 | Util |
What I am trying to do is to calculate the number of labor hours per case in a report.
If same case number has Rent and Util assistance, the hours for the case would be 6
if same case number has Rent and Rent, the hours for the case would be 7
if same case number has Util and Util, the hours for the case would be 5
I'm having difficulty determining how to do the calculation here and whether or not this should be in a measure, a calculated table, or in a calculated column. Any assistance is greatly appreciated. My report desire is to sum the hours spent on a case for each assistance type.
Solved! Go to Solution.
@jwessel Maybe:
Measure =
VAR __Case = MAX('Table'[Case Number])
VAR __Table = SUMMARIZE('Table',[Assistance])
VAR __Count = COUNTROWS(__Table)
VAR __Result =
SWITCH(TRUE(),
__Count = 2, 6,
MAXX(__Table, [Assistance]) = "Rent", 7,
5
)
RETURN
__Result
@jwessel Maybe:
Measure =
VAR __Case = MAX('Table'[Case Number])
VAR __Table = SUMMARIZE('Table',[Assistance])
VAR __Count = COUNTROWS(__Table)
VAR __Result =
SWITCH(TRUE(),
__Count = 2, 6,
MAXX(__Table, [Assistance]) = "Rent", 7,
5
)
RETURN
__Result
Hi Greg. thanks again for that information. While I didn't use it specifically due to some other factors, it definitely set me on the right path for a solution !!
thanks Greg, I will give that a try.
Apologies, column 2 is the date the case is created.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
75 | |
62 | |
51 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
60 | |
57 |