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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PPDiaz1978
Resolver I
Resolver I

Virtual Table and % User's type chart

Hi.

I have a virtual table like this

 

PPDiaz1978_0-1713205447753.png

This one is a virtual table that the third file changes depending on the data filter as I show you with scenarios.

My virtual Table was created great with this Dax code:

 

_Table =
VAR MaxDate = SELECTEDVALUE(Calendario[Fecha], MAX(Calendario[Fecha]))
RETURN
                ADDCOLUMNS(
                SUMMARIZECOLUMNS(Sesiones[user_Id], Sesiones [FechaInicio], "F1", MaxDate,
                                              "Dias",  int(MaxDate- MIN(Sesiones[FechaInicio]))),
                                              "Tipo", IF([Dias]<40,"New User", "Old_User"))
 
I have a Type_User dimension that have two values: OldUser and NewUser and I haven't a relationship with my Users Table ("Sesiones") between the type user is changing depending on data filter which is why I cant relate them.
 
Like I cant relate them, when I am going to representate in a chart, the chart is not good because it paints me 2 users for each type user for each typeUser instead of 2 old user (if I paint the first scenario) or 2 new user (If I paint the second scenario).
 
I have a simple measure that count this users:
Users = distinctcount (users)
 
I put on the measure on the chart to paint the values and I think I need to put on the userType file from UserTypeDimension on the legeng to paint well the chart, ... but like I cant do a relationship because usertype is changing when I change the data filter, the chart is not good. ... 
Any ideas???????
1 ACCEPTED SOLUTION
PPDiaz1978
Resolver I
Resolver I

I have the solution for my trouble.

I couldnt have one calculated table because my user type changes depending on the date filtered.

Like I have 3  user types, I decided to create a measure for each type, calculating one virtual table and filtering for each measure and each user_type with the user_type and calculating the number of users.

It works ¡¡

View solution in original post

2 REPLIES 2
PPDiaz1978
Resolver I
Resolver I

I have the solution for my trouble.

I couldnt have one calculated table because my user type changes depending on the date filtered.

Like I have 3  user types, I decided to create a measure for each type, calculating one virtual table and filtering for each measure and each user_type with the user_type and calculating the number of users.

It works ¡¡

Anonymous
Not applicable

Hi  @PPDiaz1978 ,

 

If you don't want the type user to change as the data is filtered, you can create a table of unrelated data to be used as a slicer and then use measure to customize the rules to influence.

If it's convenient, you can show your expected results in the form of images and or share the pbix samples after removing sensitive data. We can better understand what the problem is and help you with it.

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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