Forum Discussion
Card Visual
Hi Anonymous
Thanks for reaching out to us.
Is there any relationship between the 2 tables?
If it has one to many relationship, then you can set the summarization of field [hours] to Sum, then put the field [hours] into Card visual.
If there's no relationship, you can create this calculated measure and put it in Card,
Total Hours =
CALCULATE(SUM('support calls'[hours]),FILTER('support calls','support calls'[category ]=SELECTEDVALUE(Category[category ])))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Here's another way I'd like to present this problem. I have one table that I want to display the # of hours and minutes worked. When selecting each of the subcategories, I do see the sum of hours worked (top box), however, if I want to display the time as "hours" and "minutes", I don't get the same results (bottom box).
- KNP4 years agoSuper User
Lots of different ways to approach this.
This video shows one that you should be able to adapt to your needs.
https://www.youtube.com/watch?v=Z1hGU93UE1c&ab_channel=NestorAdrianzen
EDIT: another good option, https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
- Anonymous4 years agoNot applicable
I followed the YouTube example, and feel this is a good solution. However, I have one error that I can't seem to resolve. Everything looks accurate. Any suggestions?
- KNP4 years agoSuper User
In your return statement, I think you need to put a 'FORMAT' around the DaysInt. It will be trying to concatenate number with text.
- v-xiaotang4 years agoCommunity Support
Hi Anonymous
Thanks for your reply.
I didn't reproduce the problem, could you provide a sample file for us to test?
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
- Anonymous4 years agoNot applicable
Here are my latest findings. I've tried multiple attempts and can not get the desired outcome. First, the Card does not dynamically change when selections are made on the table. Second, time over 24 does not represent well with my example. Below I have an example of the excel sheet showing events over 24 hours. Next to that is how PowerBI displays the information both in the Table and Card when I use "Time Worked".
- KNP4 years agoSuper User
Anonymous - it looks like you're creating a calculated column, you may need to create this as a measure if you want it to be responsive to other interactions. Have a look at the links I posted above and try creating it as a new measure.