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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
wujunmin
Advocate III
Advocate III

Waffle chart by DAX

wujunmin_4-1641480105165.png

 

Matrix

 

wujunmin_2-1641480000972.png

Card

 

You only need a measure and mark it as image URL:

SVGChart =
VAR t=GENERATESERIES(1,10)
VAR tPlus=GENERATE(SELECTCOLUMNS(t,"Value1",[Value]),t)
VAR tPlusPlus=ADDCOLUMNS(tPlus,"Index",RANKX(tPlus,[Value]+[Value1]/100,,ASC))
VAR tWaffle=ADDCOLUMNS(tPlusPlus,"circle","<circle cx='"&[Value]*10-5&"' cy='"&[Value1]*10-5 &"' r='4' fill='"&IF([Index]<=ROUND([KPI]*100,0),"Grey","LightGrey")&"' fill-opacity='0.4'/>")
VAR Chart=
"data &colon;image/svg+xml;utf8,"&"
<svg xmlns='http://www.w3.org/2000/svg' height='100' width='100'>"&
CONCATENATEX(tWaffle,[circle])&"
<!-- Data label -->
<text x='50' y='50' font-size='25' text-anchor='middle' dominant-baseline='middle' fill='"& IF([KPI]>=0.3,"DarkCyan","Tomato")&"'>"&ROUND([KPI]*100,0)&"%"&"</text>
</svg> "
Return
IF(HASONEVALUE('Table'[StoreID]),Chart,BLANK())

 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors