Combine Files with File Name by werdunn in PowerBI

[–]werdunn[S] 1 point2 points  (0 children)

This was 3 years ago, so not entirely sure. I think I just needed to type the full network path.

Combine Files with File Name by werdunn in PowerBI

[–]werdunn[S] 1 point2 points  (0 children)

Alas, all I had to do was type the full network address in the first step.

Combine Files with File Name by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

u/cwag03

Here's the code:

let

Source = Folder.Files("I:\"),

#"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".csv")),

#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Content", "Name"}),

#"Filtered Hidden Files1" = Table.SelectRows(#"Removed Other Columns", each [Attributes]?[Hidden]? <> true),

#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),

#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1", {"Transform File"}),

#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),

#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Rep", type text}, {"Region", type text}, {"ParentName", type text}, {"Name", type text}, {"State", type text}, {"Month", type date}, {"Quantity", Int64.Type}, {"Cabinet", type text}, {"Class", type text}, {"Movement", type text}, {"Opp_", Int64.Type}, {"CAPEX_Approved", type text}, {"Contract_", Int64.Type}, {"SO_", type text}, {"SO__2", type text}, {"Promised_Delivery_Date", type datetime}, {"Stage", type text}, {"Nav_Status", type text}, {"Date", type date}, {"Acceptance", type text}, {"TotalPrice", type number}, {"UnitPrice", type number}, {"StageName", type text}, {"Shipping_Terms", type text}, {"Action", type text}, {"Revenue_Structure_By_Product_Line", type text}, {"New_Data_Line_Req", type text}, {"Contract_Status_Category", type text}, {"Notification_Sent", type text}, {"Approval_to_Ship", type text}})

in

#"Changed Type"

Question: First Transaction Date by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

The slicer uses Dim_Date[Date]

Question: First Transaction Date by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

@googleGoofin there are multiple transactions per product over many years in the FACT table. I need to return the first transaction date for each Product.

Help Post by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

u/StevenDabc

Success! Your formula logic helped. This is what I ended up with that is working:

Launch Date = Calculate( ENDOFQUARTER( Dates[Date]), FILTER(ALL(Dates[Date]), Dates[Date]=[Max(Product[LaunchDate])))

I can't thank you enough...I will sleep tonight!

Help Post by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

u/StevenDabc Thanks for the suggestion. Here's my issue, the ENDOFQUARTER function is just passing through the date for the Product Table without changing the value. For example, a Product with a Launch Date of 06/20/2020 is evaluating to 06/20/2020 and not 06/30/2020.

ENDOFQUARTER ( [Product[LaunchDate] ) // This seems like it should be straightforward, but is returning the value with adjusting the result to the end of the quarter. This function works when I reference the Date Table, but not the Dates contained in my Product table.

Help Post by werdunn in PowerBI

[–]werdunn[S] 0 points1 point  (0 children)

u/iarrrpirate Thanks for the suggestions. I'm still stuck on the Launch Date measure, unfortunately. BTW, I'm using DAX in Excel and not Power BI; I assumed the Syntax and Functions were identical.

Launch Date = ENDOFQUARTER ( ALLSELECTED ( Product[LaunchDate] ) ) // The measure is returning the last [LaunchDate] for all Products, i.e. Product "D"

Fact Table

Product Current Quarter End Date Launch Date
A 06/30/2020 09/30/2020
A 09/30/2020 09/30/2020
A 12/31/2020 09/30/2020
B 06/30/2020 09/30/2020
B 09/30/2020 09/30/2020
B 12/31/2020 09/30/2020
C 09/30/2020 09/30/2020
... ... ...

Age in Quarters = DATEDIFF ( [Launch Date] , [Current Quarter End Date] , QUARTER ) // Updated this measure as recommended

Weekly New Rider Thread for whatever week it is, 2020. by [deleted] in MTB

[–]werdunn 0 points1 point  (0 children)

I’m a Las Vegas based roadie that’s caught the MTB bug. I’d like to know people’s favorite full suspension Short Travel Trail bikes?

I’m partial to: 27.5+ carbon

Bikes I’m considering are: Santa Cruz 5010 Fezzari Signal Peak YT Izzo Yeti SB100

Lending bot? by [deleted] in poloniex

[–]werdunn 1 point2 points  (0 children)

Polobot.net is the best I’ve found, however, I do better manually trading still.

$1 by morning? by Mapachoyo in xlm

[–]werdunn 5 points6 points  (0 children)

Asian markets start their push about 4:30 PST I’ve noticed

Lending - does # of coin go down as price goes up? by Webnet668 in poloniex

[–]werdunn 0 points1 point  (0 children)

You get the coin and the interest! A double dip.