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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
kkanukurthi
Helper II
Helper II

Show/Move icon with Day as per category Start date within the cell range in a specific month

Hi All,

I have 2 columns start date and category. I want to show an icon(below) with day of month within speacific month range for each month From Jan till december. Please find below screenshot for refrence

Below shown are category wise start dates within year. As per start date, the icon with day should be placed for each category.    For example if the start date is 15th of month, the icon should be in middle of cell. Like wise if the start date is 1st, the icon and day should be placed in left corner of the cell. similarly for 31st, it should be placed at right corner/end within th cell.  

kkanukurthi_1-1739595438106.png

 

 

 

Please help! Thanks

1 ACCEPTED SOLUTION

Hi again 🙂
The responce is in your first post:
https://community.fabric.microsoft.com/t5/Desktop/Show-Move-icon-with-Day-as-per-category-Start-date...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
v-denglli-msft
Community Support
Community Support

Thanks for the reply from Ritaf1983, please allow me to provide another insight.

Hi @kkanukurthi ,

You can try to customize the position of the icon in the cell using SVG.

Please refers to the following steps.

The test data is as follows.

vdengllimsft_0-1739761030842.png

 

Use SVG to create the following measure.
Display icons dynamically based on the start date.

Measure = 
VAR startDate = DAY(MAX('Table'[Start Date]))
VAR svgStart = "data&colon;image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>"
VAR svg_middle = 
        "<polygon points='50,40 60,60 40,60' fill='black' />
        <text x='65' y='60' font-family='Arial' font-size='20' fill='#000000'>"& startDate &"</text>"
VAR svg_top_left_corner = 
        "<polygon points='10,0 20,20 0,20' fill='black' />
        <text x='25' y='20' font-family='Arial' font-size='20'  fill='#000000'>"& startDate &"</text>"
VAR svg_top_right_corner = 
        "<polygon points='65,0 75,20 55,20' fill='black' />
        <text x='80' y='20' font-family='Arial' font-size='20' fill='#000000'>"& startDate &"</text>"
var svgEnd = "</svg>"
RETURN
SWITCH(TRUE(),
startDate = 15, svgStart & svg_middle & svgEnd,
startDate = 1, svgStart & svg_top_left_corner & svgEnd,
startDate = 31, svgStart & svg_top_right_corner & svgEnd
)

 

The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_1-1739761384372.png

 

Please see the attached pbix for reference.

 

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @kkanukurthi 
Please refer to my response to your previous post about the same issue:
https://community.fabric.microsoft.com/t5/Desktop/Show-Move-icon-with-Day-as-per-category-Start-date...

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983, Thankyou for the reply.

I understand its impossible to break cell element into 30 pixels. But atleast im looking for divinding cell into weeks wise and place Day&Sign in whick week it falls under. Can you please amend the DAX code which you have shared in PBIX file. The result should show category wise start date that appears only once in a row like in a any single month that category start date falls under.

kkanukurthi_0-1739729941646.png

 

But your code shows day & Sign for all months.  

kkanukurthi_1-1739729941681.png

 

For example if the date is 15th it should fall under 3rd week with Day Sign/triangle in that particular month.

 Appreciate you help. Thanks

Hi again 🙂
The responce is in your first post:
https://community.fabric.microsoft.com/t5/Desktop/Show-Move-icon-with-Day-as-per-category-Start-date...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors