Forum Discussion
Calculation items removes Web URL from values - how to fix?
- 2 years ago
Again, really appreciate your effort - though the problem still remained.
So the problem seemed to be related to the calculation item "Actuals", that returns blank when the selected measure name does not contain "actuals". So the Web URL measure was simply set to blank as its name does not contain "actuals" in it.
So I tried to to change the calculation item telling it to return the selected measure when the selected measure name either contain "Actuals" or "Web URL" - and it works now!
Calculation item changed to...
Actuals=IF (CONTAINSSTRING(SELECTEDMEASURENAME(), "Actuals") ||CONTAINSSTRING(SELECTEDMEASURENAME(), "Web URL"),SELECTEDMEASURE(),BLANK())
Hi Mjolnir, try these updated measure below, and if you encounter any issues, let me know.
Web URL =
IF (
ISFILTERED(fact_table[verificationnumber]),
CALCULATE (
MAX(dim_links[URL]),
dim_organization[orgcode] = SELECTEDVALUE(dim_organization[orgcode]),
dim_calendar[year] = SELECTEDVALUE(dim_calendar[year]),
FILTER (
fact_table,
fact_table[verificationnumber] IN VALUES(fact_table[verificationnumber])
)
),
IF (
HASONEVALUE('CalculationGroup'[CalculationItem]),
SWITCH(
TRUE(),
SELECTEDMEASURENAME() = "Actuals",
CALCULATE (
MAX(dim_links[URL]),
dim_organization[orgcode] = SELECTEDVALUE(dim_organization[orgcode]),
dim_calendar[year] = SELECTEDVALUE(dim_calendar[year]),
FILTER (
fact_table,
fact_table[verificationnumber] IN VALUES(fact_table[verificationnumber])
)
),
SELECTEDMEASURENAME() = "Budget",
CALCULATE (
MAX(dim_links[URL]),
dim_organization[orgcode] = SELECTEDVALUE(dim_organization[orgcode]),
dim_calendar[year] = SELECTEDVALUE(dim_calendar[year]),
FILTER (
fact_table,
fact_table[verificationnumber] IN VALUES(fact_table[verificationnumber])
)
),
BLANK()
),
CALCULATE (
MAX(dim_links[URL]),
dim_organization[orgcode] = SELECTEDVALUE(dim_organization[orgcode]),
dim_calendar[year] = SELECTEDVALUE(dim_calendar[year]),
FILTER (
fact_table,
fact_table[verificationnumber] IN VALUES(fact_table[verificationnumber])
)
)
)
)
Did I answer your question? If so, please mark my post as the solution! ✔️
Your Kudos are much appreciated! Proud to be a Solution Supplier!
Again, really appreciate your effort - though the problem still remained.
So the problem seemed to be related to the calculation item "Actuals", that returns blank when the selected measure name does not contain "actuals". So the Web URL measure was simply set to blank as its name does not contain "actuals" in it.
So I tried to to change the calculation item telling it to return the selected measure when the selected measure name either contain "Actuals" or "Web URL" - and it works now!
Actuals=