Forum Discussion
Dynamic column name in columns from a measure
HI ,
I have a table whose purpose is to show (1) quantity in process (2) Shelf each week (week 1, wk 2 - upto Wk 17) for certain category of product (Gauge_Width). The dates for each week changes as we move forward.
Each week is defined by quantity in different steel production stages.
The current columns are measures. For i.e. Wk 1 in process is at "Coating " and "OP" stations.
5 Replies
- lbendlin
Super User
Does it have to be measures or could it be calculated columns that you generate in Power Query during dataset refresh? There it is easy to rename columns. In DAX, not so much.
- AnonymousNot applicable
Sorry for the extremely late response! I tried as you suggested, but could not figure out how to have these as calulated columns in power Query . All I could achieve was to have catgegorization column , i.e. wk 1, wk 2 under query. But I dont think I can add a column which will pick-up quantity corresponding to wk 1, wk 2. (What these two functions are achieving :
Wk1_In Process = CALCULATE(DIVIDE(SUM(StationInventories[Weight]),2000),FILTER(StationInventories,StationInventories[Wk 1 Station]="Coating"||StationInventories[Wk 1 Station]="OP")), andWk1 Shelf = [Current Wk Shelf]-[Wk1_In Process).Please share, if there is a way to get this.Much Appreciated!Thanks. - AnonymousNot applicable
- Icey
Community Support
Hi Anonymous ,
If you don't mind, please share me a dummy .pbix file for test. Please just contain necessary data in your file and remove sensitive information. Then I can do some test.😉
Best Regards,
Icey
- AnonymousNot applicable
I am not able to share a file here.