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

Clustered Column Chart

Hello everyone,

i have 3 columns Name, Last Reviewed Date, Todays Date

i have created a calumn Week since last reviewed by using dax  DATEDIFF('Table'[Last Reviewed Date],'Table'[Todays Date],WEEK))

 

abhilash_patel_3-1621868993482.png

 

i have to created below visual from above date for that purpose i have created a calulated column using below dax

Week since last reviewed = IF(ISBLANK('Table'[Week since last reviewed]),"Not Reviewed",IF('Table'[Week since last reviewed] > 4, "More than 4 Weeks",'Table'[Week since last reviewed]))

 

 i have to create below visual which shows time since last reviwed vs count in names column

abhilash_patel_4-1621869024126.jpeg

i tried to create the same in power bi but  one dates Apr-12 & Apr 05  snice reviewe happend those date are not in the table.

i am geeting below visual in power bi

abhilash_patel_5-1621869775936.png

i cannot group more than 4 weeks  

need assistance on this

 

Regards

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Try to create column like this and filter not blank value in the visual:

A = 
IF (
    WEEKNUM ( 'Table'[Last Reviewed Date], 2 )
        >= WEEKNUM ( TODAY (), 2 ) - 3 ,
    CONVERT ( FORMAT ( 'Table'[Last Reviewed Date] - MOD('Table'[Last Reviewed Date] ,7) + 6, "MMM - DD" ), STRING ),
    IF (
        ISBLANK ( 'Table'[Week since last reviewed] ),
        "Not Reviewed",
        IF ( 'Table'[Week since last reviewed] > 4, "More than 4 Weeks" )
    )
)

chart.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous you have to add date dimension in your model which will have all the weeks and use that on the x-axis and perform all weeks-related logic from that dimension.

 

It is a best practice to have a date dimension in your model when working with time intelligence. I have a blog post that talks about how you can easily add one. Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutions

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k Thanks for the reply i have created the date table and given one to many relationship date[date] to Table[Name]

i have got below visual for axis i have used (Date[week]) and for values i have used count of (Table[Name]) 

abhilash_patel_0-1621926808741.png

i need the visual like below where May 21 - Current week (week 21) , May 14 - Previous week (week 20)  &  May 7 - Previous previous week (week 19) 

Not reviwed are blanks and  others are more than 4 weeks

abhilash_patel_1-1621927291358.png

 

 

Hi @Anonymous ,

Try to create column like this and filter not blank value in the visual:

A = 
IF (
    WEEKNUM ( 'Table'[Last Reviewed Date], 2 )
        >= WEEKNUM ( TODAY (), 2 ) - 3 ,
    CONVERT ( FORMAT ( 'Table'[Last Reviewed Date] - MOD('Table'[Last Reviewed Date] ,7) + 6, "MMM - DD" ), STRING ),
    IF (
        ISBLANK ( 'Table'[Week since last reviewed] ),
        "Not Reviewed",
        IF ( 'Table'[Week since last reviewed] > 4, "More than 4 Weeks" )
    )
)

chart.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.