Power BI sum multiple times from a relationship table - graph

I have 2 tables on Power BI
Listened table:
Tracks:
Then I want to make a graph that shows per day the amount of minutes I've heard.
The problem is that, for instance, track #1 was listened 4 times, but it sums only once.
I've tried to create a relationship between tables in single and both direction but it didn't work properly.

Related

Tracking total meeting attendance across participant start and end times

I have attendance data for a virtual meeting. This includes the employee name, their direct manager, and their respective join/leave timestamps. Some employees coming and going multiple times (see rows 5 and 6)
I'd like to create a visualization showing attendance (as a percentage of total attendees) over the course of the meeting session, beginning to end.
To do this, I figured I'd create a table with the first column being a sequence of times starting from the min(join_time) and ending with the max(leave_time) broken down in 30 second intervals. Then add summary columns that count the total instances where that time falls in an employee's join/leave time like this...
I'm working in R within the tidyverse so if there's a dplyr, lubridate solution that'd be ideal.

Firebase aggregated and average engagement time mismatch

Unable to understand the average figure compared with the number which we see on the graph. Take for instance average engagement time -- what you see on the graph is mostly less than 10 minutes, while the average number which you see on top is > 16m. We are unable to tie these two data points together. We are seeing similar variation for the other 2 buckets i.e. engaged session per user and average engagement time per session. Can anyone help with this?

How can I categorize variables, count variables and define their percentages in Rstudio

Data exampleThis is my first time working in R studio.
I have a database of 36 participants but it has 150600 entries.
There is a column for the participants:
A column for the probes Activityprobe/ Screenprobe, SMSprobe and CallLogprobe
A column for the Activity Level High/low/none, screenon/off etc.
I need a code that helps me count the activity level of all the participants
High activity level. No activity level and Low activity level.
And to help me find out for every Participant what the percentages are of all their high/no/low activity.
For screenprobe I need to count how many times the participant turned their screen on and how many times they turned it off and the percentage of screen on/off.
For callLog I need to count how many times each participant got called and the percentage.
For SMS I need to count the number of SMS for each participant and their percentage.
I also need to categorize the probes. So that my database shows all the activity levels first, organized by none/high/low and then all the screenprobes, organized by on and off etc.
I hope that my description is clear

How do you compare quota counts in qualtrics?

I need to use Qualtrics to elicit responses of a group of two subjects. Participants should be randomly assigned into Participant A and Participant B.
Basically, participant A would play rock-paper-scissors game against the computer. Participant B need to place a bet on player A's final outcome of the game. Survey questions would be asked to investigate the different reaction of two players.
At the END of each participants survey, player A would be informed about whether player B placed the bet or not. ie. I need to display the previous answer of a DIFFERENT survey participant in the Qualtrics survey.
There are two way I'm thinking of doing this: randomize and assign people into two survey streams, use quota counts for survey stream A and B. Compare the number of quota. If the number of quota counts for stream B is greater than stream A, then the next participant would be assigned into survey stream A. However, I do not know how to compare quota counts.
Could someone please help me with this?
You don't need to compare quota counts. Just check the "Evenly Present Elements" box on your randomizer and Qualtrics will keep the A & B counts equal for you.

Tableau graph average and sum

I have transactional data for a sales team showing the transaction amount per transaction, the sales person for that transaction, his team and his salary. Every row denotes a unique transaction (please refer image). I need to make a team-level graph which shows the correlation between the salary they are paid and the revenue they generate for the company i.e. a simple stacked bar chart with salesTeam name on X axis and amounts on the y axis with every bar representing the total salary and total revenue(Amount) for a team.
In the example I've highlighted team 'Central', for which the salary paid is 25k (10k for salesperson A + 15k for salesperson B) and the revenue they make for the company is 430k. Please note that the salaries for some salespersons may be missing (eg. for E). The issue I'm facing is that sum(Salary) adds up the salaries for every row, so for salesperson A it becomes 20k instead of 10k. I tried avg(Salary) but that doesn't work as Tableau calculates the average for the entire column instead of average per salesperson. How can I solve this issue?
Thanks
Here you have a level of detail problem. Basically, Tableau will calculate a formula at the level of detail of the visualisation, so if salesperson is not in your view it will roll up the equation to calculate at the highest level. This is great when you want a dynamic calculation but that doesn't sound like what you are trying to achieve.
Your best option would be to aggregate the data into Tableau so you only have 1 line per sales person with a total of their revenue for all transactions. This would avoid the complexity of the calculated field (and make Tableau perform better).
However, if this is not possible the good news is the answer is a Level of Detail expression (i recommend doing some reading on this if you havent come across before). Basically, you tell Tableau at what level you want the calculation at.
If I understand you want to calculate the ratio of transaction amount and salary paid for each team.
So create a calculated field as follows:
{ FIXED [Team]
: sum(([Amount]))/
(sum({ FIXED [Sales person]:
AVG([Salary])}))
}
What this does is calculates for each team the ratio between the amount and the salary. The use of the second fixed equation that is nested within it (Salesperson) ensures that the salary is not summed for the number of transactions of a salesperson.
Using this I got a result of 17.2 for Central. Is this what you would expect? Do you need a way to account for salaries that are not known?

Resources