cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## Qlik to power bi dax it is very urgent

Dimension =if(GetSelectedCount(Themes)>0,

1 ACCEPTED SOLUTION
Community Support

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

Best Regards,

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

2 REPLIES 2
Community Support

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

Best Regards,

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

Solution Supplier

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 (
NOT ( CONTAINSSTRING ( __Permalink, vCRT ) )
),
AND (
NOT ( CONTAINSSTRING ( __Permalink, vTH ) )
)
),
SELECTEDVALUE ( Themes ),
BLANK ()
),
BLANK ()
)``````

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors