Forum Discussion

f1254lipm's avatar
f1254lipm
Frequent Visitor
3 years ago
Solved

Dynamic Column headers

Hi, I have the requirement for dynamic column names - the names of columns need to change based on certain conditions. I have tried to achieve this by implementing the technique described here: https://goodly.co.in/dynamic-column-names-power-query/

I have created a view in db with the column names, imported it (in import mode) and applied the transformations described above. The table where this dynamic change is supposed to happen is in direct query and all my other tables in the model are in dual mode. The report that uses this table contains a matrix and card visual.

The problem:

It works like it's supposed to in PBI desktop, but after I publish it, the visuals say Couldn't load data for this visual. 

Is there a way to fix this or achieve similar results with an alternative approach?

Many Thanks,
Filip

  • Dynamic column names in Power Query are poison to the meta data tracker in the Power BI service.  They will cause all of your refreshes to fail unless you continuously update the app.

     

    Instead,  create custom matrix visuals where you use either field parameters or measures as columns.

3 Replies