You can use the following formula:-
if [Date1]==[Date2] then [Number of Records] end
This will give you the count of number of records when both are same.
Hey Prashant, thanks for the reply .but i have only one column for date,
data looks like:-
Suppose user wants to compare columnA data for '05-OCT-13' and '09-OCT-13 ' then it should return 2 (distinct count of column A matching string ).
I am a sql person:- in db i would do something like this:-
select count(distnct t1.columnA) from
(select columnA from table where date = '05-OCT-13') t1, (select columnA from table where date = '09-OCT-13') t2
where t1.columnA = t2.columnA;
Want to replicate the same thing in tableau
thanks for your reply again.
Actually i wanted to compare the columns internally. finally i resolved to using parameter based sql which works fine.
Yes in Custom Sql you can use parameter. I created that parameter without using Custom Sql & with the help of calculated field achieved the same, but both the ways are correct.
thanks Prashant ..Got your approach.. Performance should be better with your approach i guess