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
bdehning
Post Prodigy
Post Prodigy

Chart shows blank bars when there is no data

bdehning_0-1715093213608.png

I use a Top 3 Measure to restrict column at less than 4 and and LOE Measure to get the X Axis Data.  How can I not show the blank columns for the 3 X-Axis Data points?  

1 ACCEPTED SOLUTION
bdehning
Post Prodigy
Post Prodigy

I solved the issue by adding both Cause and LOE to my X-Axis.  

View solution in original post

7 REPLIES 7
bdehning
Post Prodigy
Post Prodigy

I solved the issue by adding both Cause and LOE to my X-Axis.  

ExcelMonke
Responsive Resident
Responsive Resident

If you click the drop-down arrow in the data field of your X-Axis, there should be an item named "show items with no data". Unchecking this may give your intended result

ExcelMonke_1-1715102822974.png

 

 

Show items with no data has no effect either way.   

Whilst this may not be the perfect solution, you could consider creating a new summarized table, and add a Filter clause to the DAX measure to filter to the TOPN you desire, if that makes sense? So essentially, you should be left with 3 rows for each LOE measure

parry2k
Super User
Super User

@bdehning can you share the measure expression?



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.

This measure affects the number of X-Axis LOE Data 
Sort measure Count Tenure Cause =
VAR _FreqByTenure = CALCULATE([Count of Total Gross Incurred], FILTER(ALL(InjuryCause[Cause Grouping]), [Top 5 by frequency and Incurred]<6))
VAR _LN = LEN(FORMAT(CALCULATE([Count of Total Gross Incurred], ALL('LossRun'[LOE 2023])), "text"))
VAR _Pre = _FreqByTenure *POWER(10, _LN*2)
VAR _Inc = CALCULATE(RANKX(ALLSELECTED(LossRun[LOE 2023]), [Count of Total Gross Incurred],,ASC,Dense), ALLSELECTED(InjuryCause[Cause Grouping]))
VAR _Mid = _Inc * POWER(10, _LN)
RETURN
IF(ISBLANK([Count of Total Gross Incurred]), BLANK(), _Pre + _Mid + RANKX(ALLSELECTED(InjuryCause[Cause Grouping]),[Ref],,ASC,Skip))
 
This measure affects the Cause Columns for each LOE X-Axis Data.  
Top 3 by frequency =
IF (
    ISBLANK ( [Count of Total Gross Incurred] ),
    BLANK (),
    RANKX ( ALL ( InjuryCause[Cause Grouping] ), [Ref],, DESC, SKIP ))

To help Cause is used as Legend, X-Axis is LOE 2023 and Count is Y-Axis.   I use Top N of 3 for Sort Measure and Top 3 by frequejcy is filter of is less than 4.   

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.