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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to get a total amount of my caculation using switch but it is highly tricky. My table looks like this
a) and b) are part of a group
22%..., 4.5%... and b)... are also part of a group. the calculation I have used are as follow:
Hello, My issue was resolved but another one has arisen 🙂 I am trying to the calculation on all rows with the filter as condition:
Example : February is selected
1- count all rows where start_date is less than february and end_date is empty and multiply by the number of days in the month
2- count all rows where start date is less than february and end date is more than 29/02 and multiply by the number of days in the month
3- if end_date is between 01/02 and 29/02 then do datediff between the 01/02 and the end_date
I have the following result when I do my calculation
My calculation is
Hi @ivannye,
Whether your problem has been resolved? If still not, could you please provide the related table structure and more sample data(exclude sensitive data). it is better if you can provide your PBIX file
Best Regards
Rena
Hi @ivannye ,
It can't be seen what is the cause of incorrect total per subgroup from the formula you provided... Could you please provide some sample data ? And what is the expected result ? If it is possible , it is better if you can provide your PBIX file (exclude sensitive data ).
Best Regards
Rena
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!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 51 | |
| 45 |