Hi all, I'm trying to do a COUNTIFS type of thing with DAX via a calculated column... I'm still very, very new at this (DAX), but seems like it should be easy enough... I've tried all the different examples I've found on the internet, but no luck so far...
One of the criteria I'm trying to match is a date and it keeps throwing me errors... I've made sure that my date columns in my Data Model Tables are both formatted the same... the tables have a relationship. When I try the formulas with one criteria at a time, i get a proper count on the non-date criteria, but never with the date criteria...
The ultimate goal is something like this I think...
This part works:
This part doesn't even by itself:
So unless i have other errors in the formula above, I'm thinking i must be doing something wrong with my dates or their formats to prevent finding any matches? Dates in both tables are formatted as dd-MMM-yy
any suggestions what i might be doing wrong?
Here is a link to some sample data in Dropbox... https://www.dropbox.com/s/gow62f0t1bb6sgr/countifs.xlsx?dl=0
I've included the countifs results in the excel table so that A) my pivot table kind of works... and B) I can see them in the data model and would be able to tell if i was getting the right results.
The goal is to get the count into a calculated column or measure so that i can use slicers and have the count be dynamic...
As always, any help is very much appreciated!
Thanks
One of the criteria I'm trying to match is a date and it keeps throwing me errors... I've made sure that my date columns in my Data Model Tables are both formatted the same... the tables have a relationship. When I try the formulas with one criteria at a time, i get a proper count on the non-date criteria, but never with the date criteria...
The ultimate goal is something like this I think...
Code:
=CALCULATE(COUNTROWS(FILTER(ALL(rsexport),rsexport[Panel Code]=[Panel Code] && rsexport[Panel Date]=[Date] )))
This part works:
Code:
=CALCULATE(COUNTROWS(FILTER(ALL(rsexport),rsexport[Panel Code]=[Panel Code])))
This part doesn't even by itself:
Code:
=CALCULATE(COUNTROWS(FILTER(ALL(rsexport),rsexport[Panel Date]=[Date])))
So unless i have other errors in the formula above, I'm thinking i must be doing something wrong with my dates or their formats to prevent finding any matches? Dates in both tables are formatted as dd-MMM-yy
any suggestions what i might be doing wrong?
Here is a link to some sample data in Dropbox... https://www.dropbox.com/s/gow62f0t1bb6sgr/countifs.xlsx?dl=0
I've included the countifs results in the excel table so that A) my pivot table kind of works... and B) I can see them in the data model and would be able to tell if i was getting the right results.
The goal is to get the count into a calculated column or measure so that i can use slicers and have the count be dynamic...
As always, any help is very much appreciated!
Thanks