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.
@ihmerr2c
Try the following version:
AllocatedAmountp2 =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
'mediware vw_EMRToBilling',
'mediware dimFacility'[FacilityName],
'mediware vw_EMRToBilling'[bsr_Visits],
'mediware vw_EMRToBilling'[feeschedc],
'mediware vw_EMRToBilling'[Contractper]
),
"TotalAmount", [TotalAmountMeasure],
"ServedHours", [ServedHoursMeasure],
"TotalServedHoursWeek", [TotalServedHoursWeekMeasure]
),
VAR __TotalAmount = [TotalAmount]
VAR __Contractper = [Contractper]
RETURN
IF (
[bsr_Visits] > 1,
__TotalAmount * DIVIDE ( [ServedHours], [TotalServedHoursWeek] ) * __Contractper,
IF ( [feeschedc] = "Unknown", __TotalAmount * 1, __TotalAmount * __Contractper )
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Avoid Using SUMMARIZE in CALCULATE: The SUMMARIZE function can be computationally expensive, especially if your data table is large. Instead, try to create separate measures for aggregated calculations and use them in your main measure.
Break Down the Measure: Try to break down the measure into smaller parts and then combine them. For instance, create separate measures for TotalAmount, ServedHours, and TotalServedHoursWeek and then use them in your main measure.
Optimize IF Conditions: Instead of using nested IF conditions, try to use logical functions like SWITCH.
Here's a simplified version of your measure:
AllocatedAmountp2 =
VAR TotalAmountValue = [TotalAmountMeasure]
VAR ServedHoursValue = [ServedHoursMeasure]
VAR TotalServedHoursWeekValue = [TotalServedHoursWeekMeasure]
RETURN
CALCULATE (
SUMX (
'mediware vw_EMRToBilling',
VAR CalculatedAmount =
SWITCH (
TRUE (),
'mediware vw_EMRToBilling'[bsr_Visits] > 1, TotalAmountValue * DIVIDE(ServedHoursValue, TotalServedHoursWeekValue) * 'mediware vw_EMRToBilling'[Contractper],
'mediware vw_EMRToBilling'[feeschedc] = "Unknown", TotalAmountValue * 1,
TotalAmountValue * 'mediware vw_EMRToBilling'[Contractper]
)
RETURN
CalculatedAmount
)
)
Please note the following:
If the performance issue persists, you might need to look into optimizing your data model, considering hardware resources, or restructuring your data.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
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 |
---|---|
18 | |
15 | |
12 | |
10 | |
8 |
User | Count |
---|---|
24 | |
17 | |
11 | |
11 | |
10 |