Forum Discussion
Raw Power Query Table as Visual
- Anonymous1 year ago
Hi cerebro ,
Here are the steps you can follow:
1. Select [2024.10.13], [2024.10.6], [2024.10.20],[%week] -- Transform – Unpivot Columns.
2. Add Column – Custom Column – enter code.
if [Attribute] = "%week" then null else [Attribute]
3. Select [Custom] – Change Type – Date Time
4. Select [Custom] – Display the specified Format
5. Create calculated column.
Rank = IF( [Custom]=BLANK(),0, RANKX( 'True_Table',[Custom],,DESC,Dense))6. Create measure.
Measure = IF( MAX('True_Table'[Rank])<=2,SUM('True_Table'[Value]),BLANK())7. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi cerebro ,
Here are the steps you can follow:
1. Select [2024.10.13], [2024.10.6], [2024.10.20],[%week] -- Transform – Unpivot Columns.
2. Add Column – Custom Column – enter code.
if [Attribute] = "%week" then null else [Attribute]
3. Select [Custom] – Change Type – Date Time
4. Select [Custom] – Display the specified Format
5. Create calculated column.
Rank =
IF(
[Custom]=BLANK(),0,
RANKX(
'True_Table',[Custom],,DESC,Dense))
6. Create measure.
Measure =
IF(
MAX('True_Table'[Rank])<=2,SUM('True_Table'[Value]),BLANK())
7. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
many thanks, that works!