Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have two measures, but the second one returns wrong total. I added AddColumns to optimize the query. Any suggestions would be great. Thanks!
Hi @NilR ,
I have a little trick to help you see the current tables created by summarize.
test =
VAR _s =
SUMMARIZE (
'table',
[column1],
[column2],
"newcolumn1", [measure1],
"newcolumn2", [measure2]
)
RETURN
CONCATENATEX (
_s,
[column1] & " " & [column2] & " " & [newcolumn1] & " " & [newcolumn2],
"
"// here please enter "alt+enter" as <delimiter>
)
If you need more help, please share your pbix without sensitive data.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@NilR , move filter inside the measure and check
CALCULATETABLE(
ADDCOLUMNS(SUMMARIZE('PHA', '0PHA'[CNSR_INDV_ID]),
"_BIOM", 0,
"_PHA",0,
"_CTC",CALCULATE(SUMX(values('0630 BIOMPHA'[ENRL_DATE]),MAX('PHA'[CTC]),
FILTER('PHA',([ENRL_DATE]>= Min_Date && [ENRL_DATE]<= Max_Date) && [GP_NB]=_gpnb
&& [CTC] >0))) ) )
😫😭It's still not working 😞 Thank you so much! any other recommendation?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |