Forum Discussion

Sonnet's avatar
Sonnet
Helper I
3 years ago

Using ISSELECTEDMEASURE to navigate to two different drill through pages

Hi, I have a main page for the report and two for drillthrough. I am using the following measure on the action of a button to navigate to different drill through pages if I select a visual with one measure or if I select another measure on another visual.

 

Drillthrough filter = var page4 = ISSELECTEDMEASURE([Total Open Risks], [Mitigated Risks])
var result = IF(page4,"Page 4", "Page 5") return result
 
What happens is that it works with only one measure, enabling the drillthrough to only one page. For example if I select the visual with the "Mitigated Risk" measure, it brings me to Page 5. If I select "Total Open Risks" the button to drill through stays disabled.
I have also tried the following:
 
Drillthrough filter = IF( ISSELECTEDMEASURE([Total Open Risks])," Page 4", "Page 5")
 
The output is the same, it navigates to Page 5 if I select the visual with the measure "Mitigated Risks", if I select "Total Open Risks", the button stays disabled.
Another solution I have tried is:
 
Drillthrough filter = IF( ISSELECTEDMEASURE([Total Open Risks]), IF(ISSELECTEDMEASURE([Mitigated Risks])," Page 5"), "Page 4")
 
What happens is that if I select "Total Open Risks", the buttonenables and I can drill through to Page 4, if I select "Mitigated Risks", the button enables, but it brings me to Page 4 instead of Page 5.
I have also used the following:
 
switch = SWITCH(TRUE(), ISSELECTEDMEASURE([Total Open Risks]), "Page 4", ISSELECTEDMEASURE([Mitigated Risks]), "Page 5", "")
 
This measure won't enabled the button for drill through with both measure.
Any help on how to make this measure work properly is really appreaciated.
 
I use two simple bar charts with Owner on the X axes and on the Y axes one of the two measures below.
 
Mitigated Risks = CALCULATE(COUNT('Risk'[Mitigated]),'Risk'[Mitigated]="Mitigated", USERELATIONSHIP('Calendar'[Date],'Risk'[Mitigation Date]))+0
 
Open Risks = CALCULATE(COUNTx(FILTER('Risk','Risk'[Creation Date]<= max('Calendar'[Date]) && (ISBLANK('Risk'[Mitigation Date]) || 'Risk'[Mitigation Date]> max('Calendar'[Date]))),[Risk ID]),CROSSFILTER('Calendar'[Date],'Risk'[Creation Date],None))
 
Risk idOwnerCreation DateMitigation DateMitigateddescription
1owner 130/06/202231/12/2022Mitigateddescr1
2owner 230/06/2022 Opendescr2
3owner 330/06/202231/12/2022Mitigateddescr3
4owner 431/12/202230/06/2023Mitigateddescr4
5owner 531/12/202230/06/2023Mitigateddescr5
6owner 631/12/2022 Opendescr6
7owner 731/12/2022 Opendescr7
8owner 830/06/2023 Opendescr8

 

3 Replies

  • Sonnet  I hope this helps you!!Thank You!!
    Drillthrough filter =
    VAR SelectedMeasure =
    SELECTEDVALUE('Risk'[Selected Measure])
    RETURN
    SWITCH (
    SelectedMeasure,
    "Mitigated Risks", "Page 5",
    "Total Open Risks", "Page 4",
    ""
    )

    • Sonnet's avatar
      Sonnet
      Helper I

      Thank you for your help. When I use your measure, the SelectedValue function wants a column. You use '

      'Risk'[Selected Measure] 

      what is  'Selected Measure'?

      Meanwhile, I am trying to play with your measure, trying to find a working way.

       

  • I am trying this measure:

     

    Drillthrough filter = IF(
    ISSELECTEDMEASURE([Total Open Risks], [Mitigated Risks]), SWITCH(TRUE(), SELECTEDMEASURE(), "Page 4", SELECTEDMEASURE(), "Page 5"))
     
    but it does not enable the button for drill through. Any other way?