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.
Hi all,
I have some problem and dont know how to write DAX to get value at Target Column (pleass see the picture)
Anyone can help me to slove this?
Many thanks!
Solved! Go to Solution.
Hi @CongPham ,
You could use POWER() function and SUMX() function to do it.
You need two measures:
Power =
VAR a =
CALCULATE ( MAX ( 'Table'[No] ), ALLSELECTED ( 'Table' ) )
RETURN
POWER ( 0.25, a - SELECTEDVALUE ( 'Table'[No] ) )
* SELECTEDVALUE ( 'Table'[Value] )
Target =
VAR a =
CALCULATE ( MAX ( 'Table'[No] ) )
RETURN
ROUND (
0.75
* SUMX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[No] <= MAX ( 'Table'[No] ) ),
[Power]
)
+ POWER ( 0.25, a ) * 466,
0
)
Here is my result.
Hi @CongPham ,
The trick is to find the regulation and establish a general formula. Please refer to the following image:
Hi @CongPham ,
You could use POWER() function and SUMX() function to do it.
You need two measures:
Power =
VAR a =
CALCULATE ( MAX ( 'Table'[No] ), ALLSELECTED ( 'Table' ) )
RETURN
POWER ( 0.25, a - SELECTEDVALUE ( 'Table'[No] ) )
* SELECTEDVALUE ( 'Table'[Value] )
Target =
VAR a =
CALCULATE ( MAX ( 'Table'[No] ) )
RETURN
ROUND (
0.75
* SUMX (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[No] <= MAX ( 'Table'[No] ) ),
[Power]
)
+ POWER ( 0.25, a ) * 466,
0
)
Here is my result.
@v-eachen-msft Many many thank
I got the true value I need, but I still don't understand your formula's meaning.
Could you give some advice?
Hi @CongPham ,
The trick is to find the regulation and establish a general formula. Please refer to the following image:
@CongPham
872 target should be for line no 3, please check
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Ahh, Sorry, I'm capturing it with excel. Please see the full picture:
@CongPham
I am getting this:
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
116 | |
104 | |
77 | |
71 | |
51 |
User | Count |
---|---|
146 | |
107 | |
106 | |
89 | |
65 |