Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
@v-tangjie-msft I got it but i want to return only a single value
i have attacted a original pbix file which returning a single value
https://drive.google.com/file/d/14BDjnJNBd824p8NEuo4UjIMAHO3V2U-X/view?usp=sharing
Hi @shankar_234555 ,
Based on the logic of your measure, your output is correct.
When the slicer selects 2021, the variable last_val outputs the table's maximum date,
The maximum date in the table is 2021-12-1, when the measure is output correctly.
For the [result] variable, his logic is: when End of Month and last_val are equal, output [008. 001. Receivables turnover (days) v2], otherwise null, but as we can see from the figure below, the End of Month column and 2021-12-1 are not equal, so the output is null.
If you want the values to be displayed in the chart, you can change the measure to
009. 01 Ending point (value) =
var last_val = CALCULATE(
LASTDATE('008: FCT_table: Financial KPIs'[Period]),
ALLSELECTED('DIM: Date')
)
var curr_item_date = SELECTEDVALUE('DIM: Date'[End of Month])
var Result =
SWITCH(
TRUE(),
curr_item_date = last_val,[008. 001. Receivables turnover (days) v2],
0
)
return
Result
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @shankar_234555 ,
I'm sorry I don't quite understand your logic here, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
User | Count |
---|---|
90 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
98 | |
89 | |
74 | |
67 | |
62 |