Forum Discussion
CVR1392
3 years agoRegular Visitor
QlikView Script to PowerBI
Hi PBI Geeks, I am moving from Qlik to PBI. Can you help me with the DAX query for the Qlik View script below? 1. If(Match(Upper([Field]), 'Value1', 'Value2'), (Resolved - Opened), (Today() ...
- 3 years ago
With MyTable being the table that contains columns Field (text), Resolved (date), and Opened (date):
let AddColumnTicketAge = Table.AddColumn( MyTable, "Ticket_Age", each Duration.Days( if List.PositionOf({"", Text.Upper("Value1"), Text.Upper("Value2")}, Text.Upper([Field]), 1) > 0 then ([Resolved] - [Opened]) else (Date.From(DateTime.LocalNow()) - [Opened]) ), Int64.Type), AddColumnTicketOpenAge = Table.AddColumn( AddColumnTicketAge, "Ticket_Open Age", each Duration.Days( if List.PositionOf({"", Text.Upper("Value1"), Text.Upper("Value2")}, Text.Upper([Field]), 1) > 0 then null else (Date.From(DateTime.LocalNow()) - [Opened])), Int64.Type ) in AddColumnTicketOpenAgeThe Power Query language is called M (for Meshup), not DAX.
CVR1392
3 years agoRegular Visitor
Hi Martin,
It is working fine now. I have replaced "MyTable" (line 4) from your scriptwith Tickets (my table name) instead of my query's previous step table name.
Thank you,
CVR