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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Qlik to power bi dax it is very urgent

Dimension =if(GetSelectedCount(Themes)>0,
if(match(Permalink,$(vCRP)) and not match(Themes,$(vCRT)),Themes),
if(match(Permalink,$(vCRP)) and not match(Themes,'$(vTh)'),Themes))

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can try formula like below:

result = 
IF (
    COUNTROWS ( VALUES ( 'Themes'[Theme] ) ) > 0,
    IF (
        CONTAINSSTRING ( "vCRP", MAX(Themes[Theme]) ) && NOT CONTAINSSTRING ( "vCRT", MAX(Themes[Theme])),
        MAX(Themes[Theme]),
        BLANK ()
    ),
    IF (
        CONTAINSSTRING ( "vCRP", MAX(Themes[Theme]) ) && NOT CONTAINSSTRING ( "vTh", MAX(Themes[Theme])),
        MAX(Themes[Theme]),
        BLANK ()
    )
)

vkongfanfmsft_0-1709538433107.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

You can try formula like below:

result = 
IF (
    COUNTROWS ( VALUES ( 'Themes'[Theme] ) ) > 0,
    IF (
        CONTAINSSTRING ( "vCRP", MAX(Themes[Theme]) ) && NOT CONTAINSSTRING ( "vCRT", MAX(Themes[Theme])),
        MAX(Themes[Theme]),
        BLANK ()
    ),
    IF (
        CONTAINSSTRING ( "vCRP", MAX(Themes[Theme]) ) && NOT CONTAINSSTRING ( "vTh", MAX(Themes[Theme])),
        MAX(Themes[Theme]),
        BLANK ()
    )
)

vkongfanfmsft_0-1709538433107.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

govindarajan_d
Super User
Super User

Hi @Anonymous,

 

Can you try this:

MEASURE =
VAR __vCRP = "" //I don't know how this variable is populated in QlikSense
VAR __vCRT = "" //Same as above
VAR __vTH = "" //Same as above
VAR __Permalink = "" //Same as above
RETURN
    IF (
        HASONEVALUE ( Themes ),
        IF (
            OR (
                AND (
                    CONTAINSSTRING ( __Permalink, __vCRP ),
                    NOT ( CONTAINSSTRING ( __Permalink, vCRT ) )
                ),
                AND (
                    CONTAINSSTRING ( __Permalink, __vCRP ),
                    NOT ( CONTAINSSTRING ( __Permalink, vTH ) )
                )
            ),
            SELECTEDVALUE ( Themes ),
            BLANK ()
        ),
        BLANK ()
    )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.