Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
First of all, my PBI file is connected with a SQL Database via "Direct Query".
I need to compare ItemLedgerEntry[PostingDate] column with the function "today()", because i need the result wich is the number of days between today and posting date and i just need this number for every row of the table.
The thing is, in "Direct Query" connection seems impossible for me to do that, because I can't create an Aux column in the main table due to the connection.
I've tried it creating a new table and I can create a new measure (Today = Today()) but I don't know the way to add "ItemLedgerEntry[PostingDate]" in the operation.
Example:
Table1, name: ItemLedgerEntry
Column1, name: PostingDate
Column2, name: Sales Amount
What I need is to calculate (remember I'm connected via "Direct Query") the Sales Amount 0 to 30 days before today (Today - Posting Date) and the Sales Amount 30+ days before today.
Thank you!
Solved! Go to Solution.
While you can not create the column in PowerQuery during the import you should be able to make the column by right clicking the table in the main PBI Table listing (on the left) after the data is imported.
Right click the table and then select new Column
New Sales = IF (TODAY()- 'ItemLedgerEntry'[PostingDate]<31,'ItemLedgerEntry'[Sales Amount],0)
Pretty sure this is what you are looking for.
While you can not create the column in PowerQuery during the import you should be able to make the column by right clicking the table in the main PBI Table listing (on the left) after the data is imported.
Right click the table and then select new Column
New Sales = IF (TODAY()- 'ItemLedgerEntry'[PostingDate]<31,'ItemLedgerEntry'[Sales Amount],0)
Pretty sure this is what you are looking for.
Oh, **bleep**. Thank you!
I'm newbie in PowerBI. Didn't realize I can create a new column even if you can't see the values in the main table menu.
Appreciate your help and your quick response!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |