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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Mahmed1
Helper IV
Helper IV

Check selected row against Selected values from Slicer

Hi

 

im trying to a put a 1 against each row where the the current row matrix interval = the slected values in the slicer (multiple selection rather than single value is possible)

 

ive tried the below but get a 1 against each row and not the values selected in the slicer

 

Selected Intervals To Show =

VAR SelectedIntervals =ALLSELECTED(qry_previous_180_days[Revised_Time])

VAR IntervalValue = MIN(qry_previous_180_days[Revised_Time])

RETURN

IF(IntervalValue IN SelectedIntervals,1,0)

6 REPLIES 6
Mahmed1
Helper IV
Helper IV

Hey i created a disconnected interval table called Time_Disconnected but still get same result (1 against each row)

 

tried to use offset function to get same row but didnt work as it kept saying maybe duplicate values

 

Selected Intervals To Show =

VAR SelectedIntervals =ALLSELECTED(Time_Disconnected[Revised_Time])

VAR IntervalValue = MIN(qry_previous_180_days[Revised_Time])

RETURN

IF(IntervalValue IN SelectedIntervals,1,0)

Mahmed1
Helper IV
Helper IV

i dont have access to the file or computer but the result should look like this

 

IMG_6576.png

Mahmed1
Helper IV
Helper IV

Hi yes they are connected

 

Infact they are coming from same table

 

so all i wanted to do is if the current row time in the matrix visual (say 08:00) is = to whats selected in the slicer ie (say slicer selected value is 08:00 and 09:00) then put a 1

 

the formula for time is coming from same table

That won't work as they already share the filter context. At a minimum your slicer needs to be fed by a disconnected table.

Oh ok - so how can i reference the time column from this table but keep it disconnected 

 

i guess then my formula would work right?

lbendlin
Super User
Super User

are these tables connected in the data model?

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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