Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculated columns disappearing

Hi all,   I build a report using PBI Desktop. The data source is a SharePoint Online list. The report has some visualisations based on DAX calculations.   When I save and publish, everything is ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Ok so after some troubleshooting, a colleague figured out what was wrong so I thought I'd post it here as general info.

     

    The visualizations were working correctly in the pbix file on PBI Desktop but not online.

    The visualizations that were having issues were Quick Measures. The core formula is the same for all of them. The only difference is the column the evaluate in SharePoint. Here's an example of a formula:

    Help Requests to Implement an Initiative = CALCULATE(COUNTROWS('Sustainability App Analytics'),FILTER('Sustainability App Analytics','Sustainability App Analytics'[InitiativeImplementationViewed] = "TRUE"))

     

    The issue here is that the column "InitiativeImplementationViewed" and the others are text columns and the "TRUE" being evaluated has double quotes, indicating that it's a text value instead of being a boolean.

     

    The colomns were initially boolean in the SharePoint list but the transformation probably did not happen properly when imported in PBI.

    It's even weirded that it's working fine in the Desktop but not Online.

     

    The solution here was to go back to the dataset and switch all the relevant columns from Text to True/False.

    Also modified all the relevant formulas in the Quick Measures so they could evaluate the proper data type.

    The new formula looks like this:

    Help Requests to Implement an Initiative = CALCULATE(COUNTROWS('Sustainability App Analytics'),FILTER('Sustainability App Analytics','Sustainability App Analytics'[InitiativeImplementationViewed] = TRUE))