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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
1 ACCEPTED SOLUTION

 krishnakanth240_7-1770733978591.png

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

 

View solution in original post

9 REPLIES 9
v-karpurapud
Community Support
Community Support

Hi @JothiG 

We would like to confirm whether the issue has been resolved. If it is still outstanding, please share any additional information so we can assist you further.

Thank you.

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
Super User
Super User

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))

If I helped solve your problem, mark this post as a solution.
Kudos are Welcome! | AI assisted for clarity of wording. |

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.

If I helped solve your problem, mark this post as a solution.
Kudos are Welcome! | AI assisted for clarity of wording. |
krishnakanth240
Super User
Super User

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
Super User
Super User

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors