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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have a table named srs_cap with columns that contain decision information (cap_dec1, cap_dec2, cap_dec3) and the corresponding dates when those decisions were made (cap_decd, cap_dcd2, cap_dcd3).
The logic is as follows: Identify the most recent decision date from cap_decd, cap_dcd2, and cap_dcd3 that is on or before same date last year. If the corresponding decision (cap_dec1, cap_dec2, or cap_dec3) has the value 'C', then count the entries in cap_stuc.
i am using the below two measure one to check occurrence of C and second one to check U
| cap_stuc | cap_dec1 | cap_decd | cap_dec2 | cap_dcd2 | cap_dec3 | cap_dcd3 | Correct output | Conditional_Count | UnConditional_Count |
| 80171 | C | 01/08/2023 00:00 | U | 17/01/2024 00:00 | Conditional | 1 | 0 | ||
| 80335 | C | 28/11/2023 00:00 | U | 09/01/2024 00:00 | 1 | 1 | |||
| 103278 | 0 | 0 | |||||||
| 132353 | C | 14/06/2023 00:00 | Conditional | 1 | 0 | ||||
| 160112 | C | 09/01/2024 00:00 | U | 18/01/2024 00:00 | 1 | 1 | |||
| 173991 | C | 01/08/2023 00:00 | U | 24/11/2023 00:00 | Conditional | 1 | 0 | ||
| 190815 | 0 | 0 | |||||||
| 191899 | R | 07/11/2023 00:00 | 0 | 0 | |||||
| 191925 | C | 13/09/2023 00:00 | U | 17/01/2024 00:00 | Conditional | 1 | 0 | ||
| 190740 | C | 12/01/2023 00:00 | Conditional | 1 | 0 | ||||
| 19088 | R | 13/09/2023 00:00 | 0 | 0 | |||||
| 200052 | 0 | 0 | |||||||
| 200169 | 0 | 0 | |||||||
| 200269 | C | 21/09/2023 00:00 | U | 17/01/2024 00:00 | Conditional | 1 | 0 | ||
| 200284 | C | 11/05/2023 00:00 | Conditional | 1 | 0 | ||||
| 200301 | C | 01/08/2023 00:00 | U | 18/12/2023 00:00 | Conditional | 1 | 0 | ||
| 200347 | C | 11/05/2023 00:00 | U | 17/11/2023 00:00 | Conditional | 1 | 0 | ||
| 210582 | C | 13/09/2023 00:00 | U | 14/09/2023 00:00 | Unconditional | 0 | 1 | ||
| 220366 | R | 04/08/2023 00:00 | 0 | 0 | |||||
| 220371 | C | 14/06/2023 00:00 | U | 25/07/2023 00:00 | Unconditional | 0 | 1 |
Solved! Go to Solution.
@gautampruthi No idea where the 9 comes from. Likely, you should unpivot those three columns to make the calculation easier. Otherwise, you could use something like MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Fabric Community
i managed to get the desired output by changing the measure as
Hi,@gautampruthi
We are delighted that you have found a solution and are willing to share it.
Accepting your post as the solution is incredibly helpful to our community, as it enables members with similar issues to find answers more quickly.
Thank you for your valuable contribution to the community, and we wish you all the best in your work.
Best Regards,
Leroy Lu
Hi @Greg_Deckler Thank you for looking into this.
i have added more information along with the measure i am using and output i am getting.
@gautampruthi No idea where the 9 comes from. Likely, you should unpivot those three columns to make the calculation easier. Otherwise, you could use something like MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Fabric Community
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 47 | |
| 29 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 89 | |
| 74 | |
| 40 | |
| 26 | |
| 25 |