Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello all,
I would like to create add a pop-up window on top of a table to show a curve of progress of actual vs plan to raise an alarm if I am late with some tasks. The issue I have is that I don't know how to pass an argument (holdover task) to the tooltip that is currently hardcoded for task "T1&.
Any idea?
Table : Input data
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCjFU0lEyMNQ3NNQ3MjAygnKMYBxDAwMgaWygFKsDVAsWMUVSa2SMpNYIrNYEotQYZJIFslJLJI6hKVgp0NhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [task = _t, start = _t, end = _t, planned = _t, actual = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"task", type text}, {"start", type date}, {"end", type date}, {"planned", Int64.Type}, {"actual", Int64.Type}})
in
#"Changed Type"
YX : created table
YX =
// S Curve is business functions
// https://businessfunctions.com/articles/The%20Origins%20of%20the%20S%20Curve%20in%20Business%20Functions.pdf
Var _T = "T1"
Var _s = LOOKUPVALUE('Table'[start],'Table'[task],_T,0)
Var _e = LOOKUPVALUE('Table'[end],'Table'[task],_T,0)
Var _a = LOOKUPVALUE('Table'[actual],'Table'[task],_T,0)
Var _p = LOOKUPVALUE('Table'[planned],'Table'[task],_T,0)
Var _s2e = DATEDIFF(_s,_e,DAY)
Var _s2c = DATEDIFF(_s,TODAY(),DAY)
RETURN
GENERATE(
GENERATESERIES(0,_s2e,1),
VAR _scurve = IF ([Value]<0,0,IF([Value]>_s2e,1,_p/2*(1-COS(PI()*[Value]/_s2e))))
VAR _current = IF ([Value]<0,0,IF([Value]>_s2c,BLANK(),(_a/_s2c)*[Value]))
RETURN ROW("s-curve",_scurve,"actual",_current)
)
Thanks for your help!
Solved! Go to Solution.
Hello,
one of my colleagues - thanks to Jacques - could help me to solve my issue. He adviced me to go with measurements as he explained to me, tooltip is receiving data below the cursor on "parent" visual.
then solution for my case is as below
1. Table creation
Dates = GENERATESERIES(MIN('Table'[start]), MAX('Table'[end]))
actual measure
actual =
VAR _T = SELECTEDVALUE('Table'[task])
VAR d = SELECTEDVALUE(Dates[Day])
Var _s = LOOKUPVALUE('Table'[start],'Table'[task],_T,0)
Var _e = LOOKUPVALUE('Table'[end],'Table'[task],_T,0)
Var _a = LOOKUPVALUE('Table'[actual],'Table'[task],_T,0)
RETURN IF(d<_s, BLANK(), IF(d>TODAY(), BLANK(), _a*(DATEDIFF(d, _s, DAY)/DATEDIFF(_e, _s, DAY))))
s-curve measure
s-curve =
VAR _T = SELECTEDVALUE('Table'[task])
VAR d = SELECTEDVALUE(Dates[Day])
Var _s = LOOKUPVALUE('Table'[start],'Table'[task],_T,0)
Var _e = LOOKUPVALUE('Table'[end],'Table'[task],_T,0)
Var _a = LOOKUPVALUE('Table'[actual],'Table'[task],_T,0)
Var _p = LOOKUPVALUE('Table'[planned],'Table'[task],_T,0)
Var _s2e = DATEDIFF(_s,_e,DAY)
Var _s2c = DATEDIFF(_s,TODAY(),DAY)
RETURN IF(d<_s, BLANK(), IF(d>_e, BLANK(), _p*(1-COS(PI()*(DATEDIFF(d, _s, DAY)/DATEDIFF(_e, _s, DAY))))))
This is solving my issue.
Hi @stchln ,
In order to better understanding your demands and give the right solution, could you please share with me some screenshots of your data after hiding sensitive information and tell me what's your expected output?
Thanks for your efforts & time in advance.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
one of my colleagues - thanks to Jacques - could help me to solve my issue. He adviced me to go with measurements as he explained to me, tooltip is receiving data below the cursor on "parent" visual.
then solution for my case is as below
1. Table creation
Dates = GENERATESERIES(MIN('Table'[start]), MAX('Table'[end]))
actual measure
actual =
VAR _T = SELECTEDVALUE('Table'[task])
VAR d = SELECTEDVALUE(Dates[Day])
Var _s = LOOKUPVALUE('Table'[start],'Table'[task],_T,0)
Var _e = LOOKUPVALUE('Table'[end],'Table'[task],_T,0)
Var _a = LOOKUPVALUE('Table'[actual],'Table'[task],_T,0)
RETURN IF(d<_s, BLANK(), IF(d>TODAY(), BLANK(), _a*(DATEDIFF(d, _s, DAY)/DATEDIFF(_e, _s, DAY))))
s-curve measure
s-curve =
VAR _T = SELECTEDVALUE('Table'[task])
VAR d = SELECTEDVALUE(Dates[Day])
Var _s = LOOKUPVALUE('Table'[start],'Table'[task],_T,0)
Var _e = LOOKUPVALUE('Table'[end],'Table'[task],_T,0)
Var _a = LOOKUPVALUE('Table'[actual],'Table'[task],_T,0)
Var _p = LOOKUPVALUE('Table'[planned],'Table'[task],_T,0)
Var _s2e = DATEDIFF(_s,_e,DAY)
Var _s2c = DATEDIFF(_s,TODAY(),DAY)
RETURN IF(d<_s, BLANK(), IF(d>_e, BLANK(), _p*(1-COS(PI()*(DATEDIFF(d, _s, DAY)/DATEDIFF(_e, _s, DAY))))))
This is solving my issue.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
79 | |
72 | |
52 | |
46 |