Forum Discussion
Anonymous
5 years agoNot applicable
Max Date Count
Hello, I am pretty new to power bi and would like to calculate the sum of the max date in the below table Product Id Date 1 7/21/2021 18:49 2 7/20/2021 18:49 3 7/19/2021 18:49 ...
Samarth_18
Community Champion
5 years agoHi Anonymous ,
You can try below code:-
count_of_dates =
CALCULATE ( COUNT ( 'Product_data'[Date] ), LASTDATE('Product_data'[Date]) )output:-
Thanks
- Anonymous5 years agoNot applicable
Thank you so much. That worked. One last question. if I use the similar table with few more information :
Product Date Name ADDRESS 1 7/21/2021 18:49 A abc 2 7/20/2021 18:49 B def 3 7/19/2021 18:49 C dhk 4 7/20/2021 18:49 D scj 5 7/21/2021 18:49 E sbn 6 7/22/2021 18:49 F sjx 7 7/22/2021 18:49 G scn 8 7/22/2021 18:49 H ivd 9 7/22/2021 18:49 I skl 10 7/22/2021 18:49 J kjs Now I want to create a table with product, name and address using the max date, how do I do that?
- Samarth_185 years ago
Community Champion
Hi Anonymous
You can directly drag your fields on table visual and take a latest of your date. PFB screenshot for reference:-
Note:- You can get latest option when you right click on Date in Values Pane