Forum Discussion

_Bonez's avatar
_Bonez
New Member
1 year ago

Card - How to change the Visualiation

Hello,

 

This is a new area for me in Power BI and would love some help. I started coming across refresh errors when I didn't have any SharePoint data which I should have thought about. I included in my formulas a safety net that basically checks if they have a column. I was able to add this therefore preventing errors, when there was no data there would be no table but if there was, my steps would be displayed. 

My issue are visuals I use such as a card showing the sum of overdue items. It is showing <BLANK> which I understand why. I am wondering if anyone has created a formula or if it's possible when there is no data in my table to show a value of another table (which i manually created to show the sum of 0). A scenario would be that my SharePoint list table is empty the card will automatically switch to 0 (manually created table) but if there is data in the SharePoint table it will switch and show that. 

 

Thanks for any type of help!

2 Replies

  • dharmendars007's avatar
    dharmendars007
    Icon for Memorable Member rankMemorable Member

    Hello _Bonez 

     

    If you want to avoid creating a manual table, you can directly default to 0 in the measure

    Sum_Overdue_Items = COALESCE(SUM(SharePointTable[OverdueColumn]), 0)

    The COALESCE function returns the first non-blank value in the arguments provided. If the sum is blank, it will return 0.

     

    If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes πŸ‘ are much appreciated!

     

    Thank You

    Dharmendar S

    LinkedIN 

  • _Bonez 

    Create a Fallback Table
    Go to the Home tab and click Enter Data to create a simple table.
    Name the table FallbackTable and add a column with your fallback value, like this:
    FallbackValue
    0

     

    Create a Dynamic Measure

    Dynamic Overdue Items = 
    IF(
    ISBLANK(SUM('SharePointTable'[OverdueItems])),
    SUM(FallbackTable[FallbackValue]),
    SUM('SharePointTable'[OverdueItems])
    )

    πŸ’Œ If this helped, a Kudos πŸ‘ or Solution mark βœ”οΈwould be great! πŸŽ‰
    Cheers,
    Kedar
    Connect on LinkedIn