The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Book | Story | Genre | Count Historical |
Book 1 | Story1 | Horror | 0 |
Book 1 | Story2 | Romance | 0 |
Book 1 | Story3 | Romance | 0 |
Book 2 | Story4 | Historical | 3 |
Book 2 | Story5 | Historical | 3 |
Book 2 | Story6 | Historical | 3 |
I would like to figure out how to have Additional column in which i would have for each book, number of Historical stories?
I don't know how to do count by GROUP.
Thanks for answers in advance!
Solved! Go to Solution.
Try
Count historical =
CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Book] ),
'Table'[Genre] = "Historical"
)
Try
Count historical =
CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Book] ),
'Table'[Genre] = "Historical"
)