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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
can someone help me with counting rows with different dates (Date1 and Date2) in it?
Date | Date1 | Date2 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 14-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 31-Dec-99 |
04-Nov-22 | 04-Nov-22 | 14-Nov-22 |
04-Nov-22 | 04-Nov-22 | 10-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 31-Dec-99 |
04-Nov-22 | 04-Nov-22 | 31-Dec-99 |
04-Nov-22 | 04-Nov-22 | 11-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 09-Nov-22 |
04-Nov-22 | 04-Nov-22 | 07-Nov-22 |
04-Nov-22 | 04-Nov-22 | 09-Nov-22 |
04-Nov-22 | 04-Nov-22 | 31-Dec-99 |
04-Nov-22 | 04-Nov-22 | 14-Nov-22 |
04-Nov-22 | 04-Nov-22 | 09-Nov-22 |
04-Nov-22 | 04-Nov-22 | 09-Nov-22 |
04-Nov-22 | 04-Nov-22 | 10-Nov-22 |
04-Nov-22 | 04-Nov-22 | 31-Dec-99 |
04-Nov-22 | 04-Nov-22 | 04-Nov-22 |
04-Nov-22 | 04-Nov-22 | 07-Nov-22 |
I would like to count the yellow marked rows. These have different dates (Date1 and Date2) other than 31-DEC-99. This date must not be included in the count of rows.
Expected result for 04-NOV-22 is 12.
Thanks in advance.
Regards
Solved! Go to Solution.
@WLFRD ,
Should still work.
If you created a table with the "Date" column and the measure, you should get a count per date, for example:
And if you want the measure to return 0 when there is 0 rows returned (like on nov 6th in my example) then you can add a "+0" at the end of the meaure.
@WLFRD ,
Should still work.
If you created a table with the "Date" column and the measure, you should get a count per date, for example:
And if you want the measure to return 0 when there is 0 rows returned (like on nov 6th in my example) then you can add a "+0" at the end of the meaure.
Hi @WLFRD ,
Try this measure:
Measure = CALCULATE( COUNTROWS('Table'),'Table'[Date1]<>'Table'[Date2], 'Table'[Date2]<> DATE(1999, 12 , 31))
Thanks for your reply. What would be the measure if there are more dates than just the 11/04/2022 which are in the given example?
It should count the rows per day and return a single number per date for which Date2 and Date1 are not the same and exclude date2 when it is 31DEC99.
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 |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |