Forum Discussion
Using filters to change value/column in view
Hi Michell,
I have tested you solutoin which wokrs fine. And actually you do not need to reconstruct the table, you can use a query like below.
select a.Date as [Date],a.Detail as [Detail],'Sales' as [KPI],a.Sales as [Value]
from
[dbo].[Test1] as a
union all
select a.Date as [Date],a.Detail as [Detail],'Qty' as [KPI],a.Qty as [Value]
from
[dbo].[Test1] as a
Or you can create view use that query, and use the view as the data source.
Regards,
Charlie Liao
I've did my best to transcript it to M (Power Query) and work it from the Advanced Editor on Power BI, but I couldn't.
I'm not so experienced in this engine, and in my world, it would be best to be done in that step.
Could you please help me just with the syntax?
I would invest my time to construct the function.
Thanks,
Michell