The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Everyone,
I've been trying to create a measure which will return the week when one column (Cumulative_BAR_Actual_Projected) is greater than another column (Budgeted Billing Adjusted Revenue at Completion). The catch is that these two columns are from two unrelated tables. I have a table visual like the one below.
The first 3 columns come from one table and the last column, "Budgeted Billing Adjusted Revenue at Completion" comes from another table. I need to create a measure which will return the week when "Cumulative_BAR_Actual_Projected" is greater than "Budgeted Billing Adjusted Revenue at Completion". I can add it as a column to the table visual and shwo the latest week in the card visual at the bottom. I have tried a few different measure but they don't seem to work. Here are some measures I tried:
Solved! Go to Solution.
Hi @akkitek ,
Please try this measure.
Measure 3 = VAR A=ADDCOLUMNS(ALLSELECTED(FACT_Ops_Data_by_Wk[Week]),"tEST1",[Cumulative_BAR_Actual_Projected],"TEST2",SUM(FACT_Portfolio_Perf[Budgeted Billing Adjusted Revenue at Completion]),"TEST4",SUM(FACT_Ops_Data_by_Wk[Billing Adjusted Revenue]))
var b=ADDCOLUMNS(A,"TEST3",IF([tEST1]>[TEST2],[Week],BLANK()))
RETURN MAXX(FILTER(B,[Week] IN VALUES(FACT_Ops_Data_by_Wk[Week])),[TEST3])
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.
I also found another way to do this.
I first created a column, then created a measure to achieve this:
BBAR per Project =
SUMX(
FILTER(
FACT_Ops_Data_by_Wk,
FACT_Ops_Data_by_Wk[Project Code] = EARLIER(FACT_Ops_Data_by_Wk[Project Code])
),
FACT_Ops_Data_by_Wk[Budgeted Billing Adjusted Revenue]
)
Week exceeding =
IF(
[Cumulative_BAR_Actual_Projected] > SELECTEDVALUE(FACT_Ops_Data_by_Wk[BBAR per Project]), SELECTEDVALUE(FACT_Ops_Data_by_Wk[Week]),BLANK())
I also found another way to do this.
I first created a column, then created a measure to achieve this:
BBAR per Project =
SUMX(
FILTER(
FACT_Ops_Data_by_Wk,
FACT_Ops_Data_by_Wk[Project Code] = EARLIER(FACT_Ops_Data_by_Wk[Project Code])
),
FACT_Ops_Data_by_Wk[Budgeted Billing Adjusted Revenue]
)
Week exceeding =
IF(
[Cumulative_BAR_Actual_Projected] > SELECTEDVALUE(FACT_Ops_Data_by_Wk[BBAR per Project]), SELECTEDVALUE(FACT_Ops_Data_by_Wk[Week]),BLANK())
Hi @akkitek ,
Please try this measure.
Measure 3 = VAR A=ADDCOLUMNS(ALLSELECTED(FACT_Ops_Data_by_Wk[Week]),"tEST1",[Cumulative_BAR_Actual_Projected],"TEST2",SUM(FACT_Portfolio_Perf[Budgeted Billing Adjusted Revenue at Completion]),"TEST4",SUM(FACT_Ops_Data_by_Wk[Billing Adjusted Revenue]))
var b=ADDCOLUMNS(A,"TEST3",IF([tEST1]>[TEST2],[Week],BLANK()))
RETURN MAXX(FILTER(B,[Week] IN VALUES(FACT_Ops_Data_by_Wk[Week])),[TEST3])
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
75 | |
52 | |
50 |
User | Count |
---|---|
133 | |
124 | |
78 | |
64 | |
61 |