Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Mjolnir
Helper I
Helper I

Calculation items removes Web URL from values - how to fix?

Hi,

 

My measure "Actuals" returns values from the general ledger. My measure "Web URL" is used to conditionally format the "Actuals" measure to retrieve the invoice link.

This works perfect, but when the calculation group with scenarios, such as actuals, budget and early warnings are selected in a slicer - the Web URL disappears from the values, when unselected - the Web URL returns.

Can someone help me understand and fix this problem? I want the values to always contain the Web URL.

 

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] ) ) ), 

 BLANK () )

 

Actuals = SUM(fact_table[actuals])

 

 Calc Item Actuals = IF( 

 CONTAINSSTRING(SELECTEDMEASURENAME(), "Actuals"), 

 SELECTEDMEASURE(), 

 BLANK() )

 

1 ACCEPTED SOLUTION

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()
)

View solution in original post

5 REPLIES 5
ahadkarimi
Solution Specialist
Solution Specialist

Hi @Mjolnir, try these measures 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 (
        ISSELECTEDMEASURE(Actuals),  // Ensure it applies to the "Actuals" measure
        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()
    )
)
Calc Item Actuals = 
IF (
    CONTAINSSTRING(SELECTEDMEASURENAME(), "Actuals"), 
    SELECTEDMEASURE(), 
    BLANK()
)

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!

Dear @ahadkarimi ,

Appreciate your effort. The suggested measures did not solve the issue. When the calculation item is selected and filtered in the report slicer, the URL disappears from the values. The values though, are still shown.

Additional information, when calculation item "Actuals" is selected the URL disappears, BUT when multiple selections are made the URL returns, for example when "Budget" is added to the selection.

Budget =
IF(
    CONTAINSSTRING(
        SELECTEDMEASURENAME(), "Budget"),
        CALCULATE(
        SELECTEDMEASURE(),
        facts_budget[scenario] = "Budget"),
    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!

Calculation item changed to...

Actuals=
IF (
    CONTAINSSTRING(SELECTEDMEASURENAME(), "Actuals") ||
    CONTAINSSTRING(SELECTEDMEASURENAME(), "Web URL"),
    SELECTEDMEASURE(),
    BLANK()
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.