Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have table with DATE, CLIENT_ID, VISIT_ID and DEPARTMENT (and bunch of other columns). One client can make multiple visits in multiple departments. I have a measures [client_count] = DISTINCTCOUNT(CLIENT_ID) and [visit_count] = COUNT(VISIT_ID). I would like to divede clients in catagories and show it in funnel. Categories are: 1 visit, 2-3 visits, 4-6 visity. 7+ visits. And I would like these categories to by dynamic and work as slicer to filter other visuals.
I tried to make 4 different metrics, one for each category . The values are perfect, the funnel reacts on other visuals, but other visuals do not react on funnel. I would like to select category 2-3 and see which departmens are connected to these visits.
I also tried to make a lookup table of categories and put it as a category to funnel and measure [client_count] as funnel's value. The relationship was through counted DAX column, that counted visits for each client. I thought that a counted DAX column will be re-counted every time the context would change, but not. I just hold count of ALL visits. Then the other visualisation reacts on funnel, but number of clients do not correspond of the context.
Any idea, please?
Many thanks,
Vašek
Hi @Vasek00005 ,
I created some data:
Whether or not there is no category field in the other visual causes no effect, you can consider using the same table field, or create the same column in another table to create the relationship.
Here are the steps you can follow:
1. Create calculated column.
Test =
COUNTX(
FILTER(ALL('Table'),
'Table'[Client_ID]=EARLIER('Table'[Client_ID])),[Department])
Categories =
SWITCH(
TRUE(),
[Test]=1,
"1 visit",
[Test]>=2&&[Test]<=3,
"2-3 visits",
[Test]>=4&&[Test]<=6,
"4-6 visits",
[Test]>6,
"7+ visits")
2. Create measure.
Value =
CALCULATE(
DISTINCTCOUNT('Table'[Client_ID]),
FILTER(ALL('Table'),
'Table'[Categories]=MAX('Table'[Categories])))
3. Result:
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Well, I placed the question to ChatGPT as well and it came up with a working solution 🙂 I tried that for two days without success. But whey I tried hard to explain the problem to you - people - then I was able to better articulate the problem. And ChatGPT understood that.
In our office we call this approch a "debug duck". You just talk to somebody who pretends to listen and finally you come with the solution yourself 🙂
And the solution here was:
To achieve your desired outcome, where you can dynamically categorize clients based on their visit counts and use these categories as a slicer to filter other visuals, you can follow these steps:
Create a new table for categories:
Define relationships:
Create measures for client counts in each category:
Use the new category table in the funnel visualization:
Filter other visuals using the category slicer:
By following these steps, you should be able to dynamically categorize clients based on their visit counts, use these categories as a slicer to filter other visuals, and ensure that the funnel visualization reacts to changes in the slicer selection. Make sure your relationships are correctly defined and that your measures are accurately counting clients based on their visit counts.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |