The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi!
I am trying to go from this:
Payment 1 | Amount 1 | Payment 2 | Amount 2 |
Jan 1 | 10 | Feb 1 | 20 |
Jan 2 | 15 | Feb 2 | 25 |
to this:
Payment | Amount |
Jan 1 | 10 |
Feb 1 | 20 |
Jan 2 | 15 |
Feb 2 | 25 |
and I can't do this in the query editor because these are all custom columns added in the Tabular Data View.
Thank you!
Solved! Go to Solution.
Hi,
I assume you want to create a new table by using DAX formula.
Please check the below picture and the attached pbix file.
It is for creating a new table.
New Table =
VAR _tableone =
SELECTCOLUMNS (
Source,
"@Payment", Source[Payment 1],
"@Amount", Source[Amount 1]
)
VAR _tabletwo =
SELECTCOLUMNS (
Source,
"@Payment", Source[Payment 2],
"@Amount", Source[Amount 2]
)
RETURN
UNION ( _tableone, _tabletwo )
Hi,
I assume you want to create a new table by using DAX formula.
Please check the below picture and the attached pbix file.
It is for creating a new table.
New Table =
VAR _tableone =
SELECTCOLUMNS (
Source,
"@Payment", Source[Payment 1],
"@Amount", Source[Amount 1]
)
VAR _tabletwo =
SELECTCOLUMNS (
Source,
"@Payment", Source[Payment 2],
"@Amount", Source[Amount 2]
)
RETURN
UNION ( _tableone, _tabletwo )
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |