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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to search a specific timeline

Below is example of  my data. I have various applications and I should find how many percent has used the application during the last week. The graph should update if new data is added. 

 

Hesav_0-1623081954783.png

 

1 ACCEPTED SOLUTION

HI @Anonymous,

You can try to use the following measure formula to check the date field if its value in specific ranges:

% of Skype =
VAR _weekday =
    WEEKDAY ( TODAY () )
VAR range =
    CALENDAR ( TODAY () - _weekday + 1, TODAY () + 7 - _weekday )
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Display Name],
        [lastActiveDaySkype],
        "ActiveSkype", IF ( [lastActiveDaySkype] IN range, 1, 0 )
    )
RETURN
    DIVIDE (
        COUNTROWS ( FILTER ( summary, [ActiveSkype] = 1 ) ),
        COUNTROWS ( summary ),
        -1
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hmm for some reason i cannot upload any files here. The site says .xlsx and .pbix files are not supported.

Anonymous
Not applicable

Hesav_0-1623774483809.png

This is my dummy data as a picture. As i mentioned i am not able to send it as a file. I am supposed to see how many persons has used Skype during the last week (data should update all the time).

HI @Anonymous,

You can try to use the following measure formula to check the date field if its value in specific ranges:

% of Skype =
VAR _weekday =
    WEEKDAY ( TODAY () )
VAR range =
    CALENDAR ( TODAY () - _weekday + 1, TODAY () + 7 - _weekday )
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Display Name],
        [lastActiveDaySkype],
        "ActiveSkype", IF ( [lastActiveDaySkype] IN range, 1, 0 )
    )
RETURN
    DIVIDE (
        COUNTROWS ( FILTER ( summary, [ActiveSkype] = 1 ) ),
        COUNTROWS ( summary ),
        -1
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , on way, is unpivot the data and then you will get application date ,

 

then you can analyze

% using the measure

divide(countrows(table),calculate(countrows(table), allselected())

 

You can create a This week last week using date table, I will share link

 

Another way is to create a date table. Join with all date and you will inactive join. Create measure for each tool using userelationship and the create % like 

 

Divide([Skype], [Skype]+[Team])

 

refer those for userelationship

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8

Anonymous
Not applicable

In some reason I cant make this: Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense) (ofcourse using different column names etc.)

Hesav_0-1623134641172.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors