Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I quiet new in DAX and I need your help with this use case.
Here is sample data
| STATUS_ID | FILE_ID | STATUS_DATE | STATUS |
| 1 | 1 | 2020-05-08 | NEW |
| 2 | 2 | 2020-05-10 | NEW |
| 3 | 1 | 2020-05-10 | UPDATED |
| 4 | 2 | 2020-05-11 | UPDATED |
| 5 | 1 | 2020-05-12 | CLOSED |
| 6 | 3 | 2020-05-12 | NEW |
Based on this data, I want to display a Pie Chart with the number of distinct FILE_ID by STATUS.
But the tricky part ( for my point of view) is :
The exepecting result based on my sample date is :
I don't know how to manage that...
Many thanks for your help !
Solved! Go to Solution.
Hi, @Anonymous
Please check the below picture and the sample pbix file's link down below.
I suggest having a STATUS Table like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Thanks @Jihwan_Kim for this quick answer.
I think the VAR currentstatus is useless since it's not used in the dax formula.
But otherwise it works perfectly !
Thanks a lot !
Hi, @Anonymous
Please check the below picture and the sample pbix file's link down below.
I suggest having a STATUS Table like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!