Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello guys
There's a table like :
PC_ID | AC NO. | PARTY | SEAT |
RJ-8 | 59 | BJP | 8 |
RJ-8 | 60 | INC | 8 |
RJ-8 | 61 | INC | 8 |
RJ-8 | 62 | BJP | 8 |
RJ-8 | 65 | INC | 8 |
RJ-8 | 66 | BJP | 8 |
RJ-8 | 67 | INC | 8 |
RJ-8 | 68 | INC | 8 |
MY REQUIRED TABLE IS LIKE:
PC_ID | AC NO. | PARTY | SEAT | STATUS |
RJ-8 | 59 | BJP | 8 | 3/8 |
RJ-8 | 60 | INC | 8 | 5/8 |
RJ-8 | 61 | INC | 8 | 5/8 |
RJ-8 | 62 | BJP | 8 | 3/8 |
RJ-8 | 65 | INC | 8 | 5/8 |
RJ-8 | 66 | BJP | 8 | 3/8 |
RJ-8 | 67 | INC | 8 | 5/8 |
RJ-8 | 68 | INC | 8 | 5/8 |
BASICALLY IT COUNTS THE PARTY COLUMN VALUES WITH TOTAL SEATS AND RETURN A RESULT COLUMN.
Thanks & Regards ...
Solved! Go to Solution.
Hi @BIswajit_Das,
If you decide to add this column via DAX, here is an option:
And in plain text:
STATUS =
VAR currentParty = [PARTY]
RETURN COUNTROWS ( FILTER ( 'Table', [PARTY] = currentParty ) ) & "/" & [SEAT]
Best Regards,
Alexander
Hi @BIswajit_Das ,
Your solution is great, @barritown . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.
Measure performs better compared to computed columns because it doesn't take up memory space.
So I would recommend that you try not to use calculated columns for functions that can be implemented using measure, especially since the performance difference will be more noticeable when working with large data.
Please create a measure:
STATUS =
VAR TotalSeats =
MAX ( 'Table'[SEAT] )
VAR PartyCount =
CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[PARTY] ) )
RETURN
CONCATENATE ( CONCATENATE ( PartyCount, "/" ), TotalSeats )
The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @BIswajit_Das ,
Your solution is great, @barritown . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.
Measure performs better compared to computed columns because it doesn't take up memory space.
So I would recommend that you try not to use calculated columns for functions that can be implemented using measure, especially since the performance difference will be more noticeable when working with large data.
Please create a measure:
STATUS =
VAR TotalSeats =
MAX ( 'Table'[SEAT] )
VAR PartyCount =
CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[PARTY] ) )
RETURN
CONCATENATE ( CONCATENATE ( PartyCount, "/" ), TotalSeats )
The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @BIswajit_Das,
If you decide to add this column via DAX, here is an option:
And in plain text:
STATUS =
VAR currentParty = [PARTY]
RETURN COUNTROWS ( FILTER ( 'Table', [PARTY] = currentParty ) ) & "/" & [SEAT]
Best Regards,
Alexander
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |