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
There are two numerical columns, Amount1 and Amount2, along with a category and size as shown in the figure. I will create a measure (Measure 0) that changes based on parameters selected by the user using Amount2.
I have accomplished up to step 2, but I am unable to complete step 3. If I can retrieve Amount1 when Measure 0 is at its maximum, that would be sufficient, even if I cannot get the size when Measure 0 reaches its maximum. How can I achieve this?
Solved! Go to Solution.
Hi @mh20221111
You can create a measure.
Diff =
VAR a =
SUMMARIZE (
ALLSELECTED ( table ),
[Category1],
[Size],
[Amount1],
"Max0", [Measure0]
)
VAR b =
MAXX (
TOPN (
1,
FILTER ( a, [Category1] IN VALUES ( table[Category1] ) ),
[Max0], DESC
),
[Amount1]
)
RETURN
SUM ( table[Amount1] ) - b
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mh20221111
You can create a measure.
Diff =
VAR a =
SUMMARIZE (
ALLSELECTED ( table ),
[Category1],
[Size],
[Amount1],
"Max0", [Measure0]
)
VAR b =
MAXX (
TOPN (
1,
FILTER ( a, [Category1] IN VALUES ( table[Category1] ) ),
[Max0], DESC
),
[Amount1]
)
RETURN
SUM ( table[Amount1] ) - b
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I was able to implement what I wanted to do using the method you explained. Thank you for your guidance.
Thank you for your response.
After creating the measure based on the description you provided, I was able to display the desired values and replicate the initial chart using a table visual. However, when I applied a filter on Size, the measure returned 0. I suspect that the issue is related to the use of the ALLSELECTED function. Is there a workaround for this?
Hi @mh20221111
How do you filter the size field? Can you provide some pictures of the problem you encountered?
Best Regards!
Yolo Zhu
I'm attaching an image now. Could you please check it?
before filteringBefore
After
Hi @mh20221111 , Could you please try this please
Thank you for your response.
FIRSTNONBLANK('Table'[Amount1], 1),
Regarding the above, my table is a calculation table, so I cannot use fully qualified column references. Is there another way to write 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 |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 33 | |
| 32 | |
| 32 |