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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
JothiG
Helper III
Helper III

Dax correction

CALCULATE( COUNTROWS ( VW_Holiday_details) ,ALL(VW_Holiday_details[fin_year])) --this dax is not working correctly  
-- result should be 19 rows but result is 16 rows . 
sample data here
div_codedatedescriptionshortdescdel_statusHoliday_TypeStatecodefin_year
12024-04-19 00:00:00.000LOK SABHA ELECTION DAY 2024ELECTNN12024
12024-05-01 00:00:00.000MAY DAYMAY1NN12024
12024-08-15 00:00:00.000INDEPENDENCE DAYAUG15NN12024
12024-10-02 00:00:00.000GANDHI JAYANTHIOCT2NN12024
12024-10-30 00:00:00.000DEEPAVALIDEEPANF12024
12024-10-31 00:00:00.000DEEPAVALIDEEPANF12024
12024-11-01 00:00:00.000DEEPAVALIDIWALNF12024
12025-01-14 00:00:00.000PONGALPONGANF12024
12025-01-15 00:00:00.000PONGALPONGANF12024
12025-01-26 00:00:00.000REPUBLIC DAYREPUBNN12024
12025-04-14 00:00:00.000TAMIL NEW YEARTAMILNF12025
12025-05-01 00:00:00.000MAY DAYMAY 1NN12025
12025-08-15 00:00:00.000INDEPENDENCE DAYAUG24NN12025
12025-10-02 00:00:00.000GANDHI JAYANTHIOCT2NN12025
12025-10-20 00:00:00.000DEEPAWALIDEEPANF12025
12025-10-21 00:00:00.000DEEPAWALIDEEPANF12025
12026-01-15 00:00:00.000PONGALPONGANF12025
12026-01-16 00:00:00.000PONGALPONGANF12025
12026-01-26 00:00:00.000REPUBILC DAYJAN26NN12025
8 REPLIES 8
v-karpurapud
Community Support
Community Support

Hi @JothiG 

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @krishnakanth240 , @Ashish_Mathur and @pcoley  for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solution?If you have any more questions, please let us know and we’ll be happy to help.

Regards,

Microsoft Fabric Community Support Team

 

Ashish_Mathur
Super User
Super User

Hi,

Why are you using the ALL() function there?  Why not just this?

=CALCULATECOUNTROWS ( VW_Holiday_details)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
pcoley
Resolver II
Resolver II

please try CALCULATECOUNTROWS ( VW_Holiday_details) ,ALL(VW_Holiday_details)) 
And if you want to keep filters from other viz:
CALCULATE( COUNTROWS ( VW_Holiday_details) ,ALLSELECTED(VW_Holiday_details))

I think you have some other filters pointing your viz. to remove all filters please try with this formula:

CALCULATECOUNTROWS ( VW_Holiday_details) ,ALL()) 

I hope this helps. if so please mark it as a solution. kudos are welcome.

krishnakanth240
Power Participant
Power Participant

Hi @JothiG 

 

If your intention is to count all rows ignoring all filters, then remove field [fin_year] from ALL argument and check the count.

 

krishnakanth240
Power Participant
Power Participant

Hi @JothiG 

 

If your intention is to count all rows ignoring all filters, then remove field [fin_year] from ALL argument and check the count.

 

CALCULATE( COUNTROWS ( VW_Holiday_details ),ALL(VW_Holiday_details)) --this is also gives 16 rows.

 krishnakanth240_7-1770733978591.png

Hi @JothiG , I have tried. It is picking 19 records.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 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.