Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey all,
I want to calculate the number of tenant per application.
1. I tried using power query i.e conditional column
if application contains X give X,
if application contains Y give Y,
else Others
But when i try to do that it is not giving me the accurate result
if you can see tenant id "A" Has X ,Y,Z so it should be counted in three of the results but it is just showing it in the X and Others
2. I even tried using dax
data---
Tenant ID | Application |
A | X,Y,Z |
B | Y,R,T |
C | X,Y,T |
D | R,T,X |
Please give me an suggestion how can i solve this problem.
Solved! Go to Solution.
Hey @YASHASHRI , you can try this measure:
tenantID# =
VAR current_app = SELECTEDVALUE ( Table_2[Application] )
VAR tenantsWithApp = FILTER ( Table_, CONTAINSSTRING ( Table_[Application ], current_app ) )
RETURN
IF ( ISFILTERED ( Table_2[Application] ), COUNTROWS ( tenantsWithApp ) )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
@YASHASHRI , yes, this is the first table. And you need a table with your applications as a dimension table.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Hey @YASHASHRI , you can try this measure:
tenantID# =
VAR current_app = SELECTEDVALUE ( Table_2[Application] )
VAR tenantsWithApp = FILTER ( Table_, CONTAINSSTRING ( Table_[Application ], current_app ) )
RETURN
IF ( ISFILTERED ( Table_2[Application] ), COUNTROWS ( tenantsWithApp ) )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
what are you taking as Table_2 and Table_????
tenantID# = VAR current_app = SELECTEDVALUE ( Table_2[Application] ) VAR tenantsWithApp = FILTER ( Table_, CONTAINSSTRING ( Table_[Application ], current_app ) ) RETURN IF ( ISFILTERED ( Table_2[Application] ), COUNTROWS ( tenantsWithApp ) )
Because in my case there is only one table and that is the below one
Tenant ID | Application |
A | X,Y,Z |
B | Y,R,T |
C | X,Y,T |
D | R,T,X |
@YASHASHRI , yes, this is the first table. And you need a table with your applications as a dimension table.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |