Forum Discussion
Chart shows blank bars when there is no data
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?
I solved the issue by adding both Cause and LOE to my X-Axis.
7 Replies
- bdehning
Post Prodigy
This measure affects the number of X-Axis LOE DataSort 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)RETURNIF(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 ))- bdehning
Post Prodigy
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.
- ExcelMonke
Impactful Individual
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
- bdehning
Post Prodigy
Show items with no data has no effect either way.
- ExcelMonke
Impactful Individual
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
- bdehning
Post Prodigy
I solved the issue by adding both Cause and LOE to my X-Axis.