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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Add column that count summarized variable

I am trying to summarize some data that is set out as follows

reidnmorrison_0-1668778152633.png

 

I wannt to show the number of tasks for each person and also what the worst [Due Status] is for each person. So for example Person A has 4 tasks and the worst [Due Status] is 'Overdue'. I have done this by adding a calculated column [Rank] and then creating a new table using the following DAX 

 

Summary = 
ADDCOLUMNS(
    SUMMARIZE(
        'Table1',
        Table1[Person],
        "Number of tasks", CALCULATE(COUNTROWS('Table1'))
    ),
    "Status",
        CALCULATE (
            SELECTCOLUMNS (
                TOPN ( 1, 'Table1', 'Table1'[Rank] ),
                "val", 'Table1'[Due Status]
            )
        )
)

 

There is one extra bit I am stuggling with. That is also adding a column that counts the number of times the worst [Due Status] appears.

 

For example:

  • For Person A it would be 'Overdue' and count would be 2.
  • For Person B it would be 'In date' and the count would be 4.
  • For Person E it would be 'Due Soon' and the count would be 1. 
1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

 

if you create additional calculated column and/or calculated table, your model becomes slow performing.

 

See my pbi file. I have used a small snapshot table for the ranking.

 

https://1drv.ms/u/s!Aj45jbu0mDVJi2GypBfgxC2_wMkd?e=Ca9qyB

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

What is th definitition of "worst due status"?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

 

if you create additional calculated column and/or calculated table, your model becomes slow performing.

 

See my pbi file. I have used a small snapshot table for the ranking.

 

https://1drv.ms/u/s!Aj45jbu0mDVJi2GypBfgxC2_wMkd?e=Ca9qyB

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

please provide the sample data in usable format, not as a screenshot.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.