Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have two variables and want to sum in one Measure.
VAR Filter1 = { 196, 176, 137, 167, 171, 141, 160, 161 }
VAR Filter2 = { 145, 121 }
VAR FIlter3 = { 2065, 178, 138, 189, 148, 149, 190, 164, 2578, 2778, 2878, 194, 169 }
VAR Income =
CALCULATE (
[Income],
DATESMTD ( 'Date'[Date] ),
FILTER (
OrganizationDepartment_LookUP,
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &&
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &&
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3 ) )
VAR HoureTarget =
CALCULATE (
CALCULATE (
SUMX (
DoctorTarget,
DoctorTarget[TARGET] * CALCULATE ( [RealTime], DATESMTD ( 'Date'[Date] ) ) ),
FILTER (
OrganizationDepartment_LookUP,
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &&
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &&
NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3)),
TREATAS (
SUMMARIZE ( 'Date', 'Date'[Year], 'Date'[Month Number] ),
DoctorTarget[YEAR],
DoctorTarget[MONTH] ) )
RETURN CALC4 = IF ( HoureTarget = BLANK(), Income, HoureTarget )
My result is sum, but it is not correct. this tree values which is "result true" does not add at the department level:
Solved! Go to Solution.
Hi @PowerMan1
Not sure if I understand your expected result correctly. Do you want to add up the total of all sub values and show it on the subtotal row? If so, you can try the following measure:
measure2 = SUMX ( VALUES ( 'Table'[Code] ), [your original measure] )
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @PowerMan1
Not sure if I understand your expected result correctly. Do you want to add up the total of all sub values and show it on the subtotal row? If so, you can try the following measure:
measure2 = SUMX ( VALUES ( 'Table'[Code] ), [your original measure] )
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 10 | |
| 5 | |
| 5 |