Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JoseHop
Helper I
Helper I

How do you get the number of days of the week that a child is present?

 Hi, 

 

I have a tabel with child_id and a lot of dates that the child is present. I would like to know how many kids are 1, 2, 3, 4, or 5 days per week present? 

 

Tabel:

KIND_IDDATE
2417771-8-2022
2417772-8-2022
2417778-8-2022
2417779-8-2022
24177715-8-2022
24177716-8-2022
24177722-8-2022
24177723-8-2022
24177729-8-2022
24177730-8-2022
2417775-9-2022
2417776-9-2022
24177712-9-2022
24177713-9-2022
24177719-9-2022
24177720-9-2022
24177726-9-2022
24177727-9-2022
2417773-10-2022
2417774-10-2022
24177710-10-2022
24177711-10-2022
24177717-10-2022
24177718-10-2022
24177724-10-2022
24177725-10-2022
24177731-10-2022
2417771-11-2022
2417777-11-2022
24177714-11-2022
24177715-11-2022
24177721-11-2022
24177722-11-2022
24177728-11-2022
24177729-11-2022
2417775-12-2022
2417776-12-2022
24177712-12-2022
24177713-12-2022
24177719-12-2022
24177720-12-2022
2359271-8-2022
2359272-8-2022
2359273-8-2022
2359274-8-2022
2359275-8-2022
2359278-8-2022
2359279-8-2022
23592710-8-2022
23592711-8-2022
23592712-8-2022
23592715-8-2022
23592716-8-2022
23592717-8-2022
23592718-8-2022
23592719-8-2022
23592722-8-2022
23592723-8-2022
23592724-8-2022
23592725-8-2022
23592726-8-2022
23592729-8-2022
23592730-8-2022
23592731-8-2022
2349361-8-2022
2349368-8-2022
23493615-8-2022
23493622-8-2022
23493629-8-2022
2349365-9-2022
23493612-9-2022
23493619-9-2022
23493626-9-2022
2349363-10-2022
23493610-10-2022
23493617-10-2022
23493624-10-2022
23493631-10-2022
2349367-11-2022
23493614-11-2022
23493621-11-2022
23493628-11-2022
2349365-12-2022
23493612-12-2022
23493619-12-2022
1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thnx you, this really helps. 
What I'm exactly looking for is: in week 42 there is
2% 1 day present,
80% is 2 days present,
16% is 3 days present, 

1% is 4 days present,
1% is 5 days present.
Could you help me with that?

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you some much. This really worked.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
JoseHop
Helper I
Helper I

@Greg_Deckler thnx for your reply. I did add WEEKNUM and WEEKDAY column. The SUMMERIZE is not going well. Can you write it out for me?

@JoseHop Maybe something like this:

Measure 5 days = 
  VAR __Table = SUMMARIZE('Table',[KIND_ID],[WeekNum],"__Count",COUNTROWS(DISTINCT('Table'[Weekday)))
RETURN
  COUNTROWS(FILTER(__Table,[__Count]=5))

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@JoseHop Add a WEEKNUM column and a WEEKDAY column. Then you can SUMMARIZE by child and weeknum with a distinct count of weekdays.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.