Forum Discussion
Measure error to avoid blank pie chart "The function SUM cannot with values of type String"
Tried this and got a new error "A single value for column 'Planned' in table 'B-Base Planned' cannot be determined. This can happen when a measure formula refers to a colum that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
*I did cahnge my formula to 'Planned' instead of 'Expense' , just realized I was using the wrong data field but still has the same issue*
This new error makes sence. I am trying to make a pie chart with each slice representing a different type of planned spending (e.g. office furnature, training, travel, etc.). I have 14 different spending types in my legend, which all currently sit at $0. I don't want any aggregation like SUM or COUNT, because the numbers I'm pulling from Excel are already totals. I just want there to be some indicator that there has been no spending, until a number is added to one of those rows in my Excel sheet.
Yep that makes sense. In that case you could also try this:
Measure = IF(ISBLANK(SelectedValue('B-Base Planned'[Expense])), "No Data Available", "")
- jessmc641 year agoNew Member
Thank you so much for your help I'm so colse!!
The visual is showing up saying "No Data Available". Now all I need is for it to disappear when there is data. I tested this by updating my linked speadsheet with some numbers in the 'Planned Spending' rows. When I hit refresh my pie chart appeared, but the "No Data Available" card is still on top. How do I make it automatically go away when there is data?
- d_m_LNK1 year agoSuper User
That sounds like a separate issue than the measure. It sounds like you are stacking two different visuals on top of one another? This might be a good post for a new thread maybe. If the measure is fixed can you mark the solution and post a new thread about stacking visuals when blank?
- Anonymous1 year agoNot applicable
Hi jessmc64 ,
Thank you d_m_LNK for the accurate response!
Thank you for your question! To ensure that the "No Data Available" message disappears automatically when data is present, you may use the following measure :
Measure = IF( ISBLANK(SUM('B-Base Planned'[Planned])), "No Data Available",BLANK() )
ion.
Thank you for being a valued member in Microsoft Fabric Community Forum!
If it did not resolve your query,As d_m_LNK suggested please raise new thread about stacking visuals.As measure is fixed ,please mark the solution as accepted.- jessmc641 year agoNew Member
The card now says "BLANK" instead of "No Data Available" and did not disppear when data became available unfortnuately