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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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 ¡¡

v-yangliu-msft
Community Support
Community Support

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors