Forum Discussion
Highlight in scatter plot using field parameter
- 1 year ago
Measure:
Highlight Valgte Muligheder =
VAR Opslag = VALUES('Highlight indhold'[Valgmuligheder]) -- Captures all currently selected values
VAR Business_Cases = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Business Cases])), 1, 0)
VAR Storbageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Storbageri])), 1, 0)
VAR Bageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Bageri])), 1, 0)
VAR Resultat = Business_Cases + Storbageri + Bageri
VAR MultiResultat = IF(Resultat > 0, 1, 0) -- Assign 1 if at least one condition is met
RETURN
IF(
HASONEFILTER('Highlight indhold'[Valgmuligheder]),
Resultat,
IF(ISCROSSFILTERED('Highlight indhold'[Valgmuligheder]), MultiResultat, BLANK())
)Let me know if this resolves the issue!
If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
- 1 year ago
Hi Again Kedar_Pande
I thing i found the issue. It is because I have a colomn with three different department for each ID in the same tabel where I check for my Field Parameter such as "Business Cases" and "Storbageri" etc.
The department is in a slicer, and when I select one department everything in your DAX formula works great !
Could you please tell have to add to your DAX if all departments are selected in the slicer it return 0.
So if there is non selected in the department slicer the measure should only give 1 to the ID's that have multiselected (F.eks. Business Cases and Storbageri) in the same department under each ID ?
I really hope you can help me, because you are so close to the answer 🙂
Measure:
Highlight Valgte Muligheder =
VAR Opslag = VALUES('Highlight indhold'[Valgmuligheder]) -- Captures all currently selected values
VAR Business_Cases = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Business Cases])), 1, 0)
VAR Storbageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Storbageri])), 1, 0)
VAR Bageri = IF(CONTAINS(Opslag, 'Highlight indhold'[Valgmuligheder], MAX(HighligtGBS[HL - Bageri])), 1, 0)
VAR Resultat = Business_Cases + Storbageri + Bageri
VAR MultiResultat = IF(Resultat > 0, 1, 0) -- Assign 1 if at least one condition is met
RETURN
IF(
HASONEFILTER('Highlight indhold'[Valgmuligheder]),
Resultat,
IF(ISCROSSFILTERED('Highlight indhold'[Valgmuligheder]), MultiResultat, BLANK())
)
Let me know if this resolves the issue!
If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
Hi Again Kedar_Pande
I thing i found the issue. It is because I have a colomn with three different department for each ID in the same tabel where I check for my Field Parameter such as "Business Cases" and "Storbageri" etc.
The department is in a slicer, and when I select one department everything in your DAX formula works great !
Could you please tell have to add to your DAX if all departments are selected in the slicer it return 0.
So if there is non selected in the department slicer the measure should only give 1 to the ID's that have multiselected (F.eks. Business Cases and Storbageri) in the same department under each ID ?
I really hope you can help me, because you are so close to the answer 🙂