Forum Discussion
COUNTROWS Function
- 4 years ago
Sorry, I'd focussed on the SUMMARIZE and totally missed what the SELECTCOLUMNS was doing!
When you add the COUNTROWS in have you tried dropping the measure into a card on an empty page with no report filters set. Just wondering if something is already in the filter context.
Hi,
If I'm understanding when you materialise the two tables as calculated tables separatly you end up with an "DateLastRDV" in both. The first one will have max date from Dec 21 and the second from Nov 21.
That is then a problem when you use INTERSECT because it returns a table which has all the rows in the first table that are also in the second table. Because no row can have the same date in both tables you get an empty table returned.
If that isn't it can you supply some dummy data in a pbix?
Hello bcdodds,
Thanks very much for your help.
In fact, the function INTERSECT has two parameters (tables). If you look deeply you will notice that each one of them(parameters) is a table with only one columns named "BaselineCode". The columns "DateLastRDV" are not kept in the both parameters of INTERSECT because I knew what you have just said, which is absolutely true (Look at SUMMARIZE).
Then the function INTERSECT works well when it is excuted without COUNTROWS. It returns a table with a single columns named "BaselineCode".
My challenge is to count the number of rows of the result of INTERSECT function; but the function COUNTROWS is not working.
I hope it is a little more clear now? If not, please come back to me.
- bcdobbs4 years agoCommunity Champion
Sorry, I'd focussed on the SUMMARIZE and totally missed what the SELECTCOLUMNS was doing!
When you add the COUNTROWS in have you tried dropping the measure into a card on an empty page with no report filters set. Just wondering if something is already in the filter context.