Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi everyone! I need help with a chart that shows how many times a person worked less than 2 times on a month but more than 0. The database looks like this:
ID Date Month
1 1-1-2019 Jan
1 1-2-2019 Jan
1 20-2-2019 Feb
2 10-1-2019 Feb
2 15-2-2019 Feb
2 15-3-2019 Mar
3 1-3-2019 Mar
3 2-3-2019 Mar
3 3-3-2019 Mar
The table shows the ID of the person and the date and month when the person worked. So, if I have a chart with "Number of persons v/s Months" the table of this chart would be:
Month | Number of persons
Jan 2
Feb 1
Mar 1
Still don't know how to make this count,
Thank you for your time,
Best regards,
Gabriela
Solved! Go to Solution.
Hi @Anonymous ,
Try the following code for a measure:
Count below 2 times = COUNTROWS ( FILTER ( SUMMARIZE ( Table; Table[Month]; Table[ID]; "CountID"; COUNT ( Table[ID] ) ); [CountID] < 2 ) )
Regards.
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Try the following code for a measure:
Count below 2 times = COUNTROWS ( FILTER ( SUMMARIZE ( Table; Table[Month]; Table[ID]; "CountID"; COUNT ( Table[ID] ) ); [CountID] < 2 ) )
Regards.
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix exactly that's the solution! thanks a lot! 🙂
I'd appreciate if you could help me with a little detail: ¿how can I show 0 on the months I have 0? because now the months with 0 just disappear from the visual and I want them present but with a bar on 0 level, is that possible?
Best regards,
Gabriela
Hi @Anonymous
Try to add +0 to the measure.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsExcellent! Thanks@MFelix !! I made such a big bypass to solve it haha now It looks like it should,
Have a great week 🙂
Gabriela
User | Count |
---|---|
47 | |
26 | |
22 | |
17 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |