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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Ive got an excel import of orders.
One of the collums is called [reden van annulering] I want to count all the rows where the Year value is, for example, 2021.
Tried formula below but this won't work. Any one an idea what i should use instead?
annuleringen 2021 = CALCULATE( COUNTROWS(ALL(Sheet0[reden voor annulering] where YEAR ( Sheet0[datum verwijsbrief] ) = 2021)))
Solved! Go to Solution.
Hi @Anonymous .
Try this DAX;
annuleringen 2021 = CALCULATE( COUNTROWS(Sheet0), YEAR ( Sheet0[datum verwijsbrief] ) = 2021)).
Regards,
Sanket.
If this post helps , then mark it as 'Accept as Answer' and give it a thumbs up.
Hi @Anonymous
It seems you want to count the non-blank rows in [reden voor annulering] column for every year. You can first add a Year column to the table.
Then create the following measure
Count Measure = CALCULATE(COUNT(Sheet0[reden voor annulering]),Sheet0[reden voor annulering]<>BLANK())
Put Year column and the measure into a table visual, you will get the count for every year.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Anonymous
It seems you want to count the non-blank rows in [reden voor annulering] column for every year. You can first add a Year column to the table.
Then create the following measure
Count Measure = CALCULATE(COUNT(Sheet0[reden voor annulering]),Sheet0[reden voor annulering]<>BLANK())
Put Year column and the measure into a table visual, you will get the count for every year.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
This way it counts all the rows, i want only to count the rows in column Sheet0[reden voor annulering] idf this is filled with an tekst value (this tekst are different reasons)
Hi @Anonymous .
Try this DAX;
annuleringen 2021 = CALCULATE( COUNTROWS(Sheet0), YEAR ( Sheet0[datum verwijsbrief] ) = 2021)).
Regards,
Sanket.
If this post helps , then mark it as 'Accept as Answer' and give it a thumbs up.
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 |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |