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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
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
Solution Sage
Solution Sage

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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.