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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
KleinhansStefan
Frequent Visitor

Filter Using a Slicer With No Relational Table

Good day,
I am trying to filter my data like you would do in SSRS by using a paramter.
I want to see Site Visits to Clients base on a Slicer Value.
I have the Main Table with client, and a calculated column to calculate the site visits based on the Arrival time.
Then I created a new table with a calculated value for the numbers
CountFilter = GENERATESERIES(1, 20, 1)"

Now I cant get it to filter
I have tried to create a relationship between the two by and it went for Many-to-One (MainTable - to - CountFilter)
When I leave it on single then I only get a 1 or 0 value, if I leave it on Both direction then i get all the values from 1 to 20 but it shows no data when I select anything other than 1

Visual is a simple table with customer and the Sum of Site visits
the DAX calculate column code is

SiteVisits = IF(NOT(ISBLANK('MainTable'[ArrivalTime].[Date])), 1, 0)

Does anyone have an Idea where I can start to troubleshoot. Or if there is any alternitave?
Main Goal is select 5 for instance and then i see all customers with 5 site vistis or more. Greater than 5

 
PS.
I tried this below as well, did not work.

Filtered Visits =
VAR SelectedCount = SELECTEDVALUE(CountFilter[Value])
RETURN
CALCULATE(
COUNTROWS(FILTER('MainTable', NOT(ISBLANK('MainTable'[ArrivalTime].[Date])))),
FILTER(CountFilter, CountFilter[Value] <= SelectedCount)
)

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Here is one way to do this:

Data:

ValtteriN_0-1698300075337.png

 

Parameter:

VisitFilter = GENERATESERIES(0, 20, 1)

Visit measure =
Visit neasure = COUNT(Visits[Visit]) //using simple count for demo

For actual filtering use this kind of measure:

Filter measure = IF([Visit neasure]=[VisitFilter Value],1,0)

Now place it as a filter like this:
ValtteriN_1-1698300321416.png

After selecting a value the filter displays the correct value:

ValtteriN_2-1698300355307.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
KleinhansStefan
Frequent Visitor

@ValtteriN 
Thank you for this. I eventually got it to work, had some trouble getting to where you where.
So the concept works, I was just wondering is there was no way to show customer greater than selected value?

ValtteriN
Super User
Super User

Hi,

Here is one way to do this:

Data:

ValtteriN_0-1698300075337.png

 

Parameter:

VisitFilter = GENERATESERIES(0, 20, 1)

Visit measure =
Visit neasure = COUNT(Visits[Visit]) //using simple count for demo

For actual filtering use this kind of measure:

Filter measure = IF([Visit neasure]=[VisitFilter Value],1,0)

Now place it as a filter like this:
ValtteriN_1-1698300321416.png

After selecting a value the filter displays the correct value:

ValtteriN_2-1698300355307.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@ValtteriN 
Never mind, umm I found my issue while I was replying.

Filter = IF([SiteVisit] >= VisitFilter[VisitFilter Value], 1, 0)

Thanks for your help

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors