+ Reply to Thread
Results 1 to 4 of 4

DAX - Unpivoting values based on the period

  1. #1
    Registered User
    Join Date
    07-27-2022
    Location
    Skopje
    MS-Off Ver
    Office 365
    Posts
    9

    DAX - Unpivoting values based on the period

    Hi all,

    I have a file that contains the circuit, the charge and the dates those charge is related to.

    The dates are in two columns (Start Date and End Date).

    I would like to unpivot this table and proportionally distribute the charge as per the period it is related to.

    The problem exists when the Start Date and the End Date are in different periods.

    For an instance, Start Date 01/12/2023 and End Date 18/02/2023.

    Please check the file and it will be clear to you.

    All this should be done in Power BI.

    Thank you very much. I appreciate it.
    Attached Files Attached Files
    Last edited by Bone1897; 03-15-2023 at 01:38 PM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: DAX - Unpivoting values based on the period

    with Power Query (no DAX)

    Circuit June-2022 July-2022 August-2022 September-2022 October-2022 November-2022 December-2022 January-2023 February-2023
    GG116083
    121
    121
    121
    121
    121
    121
    121
    121
    121
    GG142744
    36.27
    36.27
    GG143168
    127.86
    127.86

  3. #3
    Registered User
    Join Date
    07-27-2022
    Location
    Skopje
    MS-Off Ver
    Office 365
    Posts
    9

    Re: DAX - Unpivoting values based on the period

    Thank you very much. I resolved my problem with calculated columns, but I will use your solution in future projects, as it seems more efficient.

    Have a nice day ahead.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: DAX - Unpivoting values based on the period

    sure,

    You are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unpivoting using Power Query
    By TheRetroChief in forum Excel General
    Replies: 9
    Last Post: 10-17-2020, 09:12 PM
  2. Values based on a rolling 6 month time period
    By andyking40 in forum Excel General
    Replies: 4
    Last Post: 12-18-2018, 03:22 AM
  3. [SOLVED] Unpivoting columns in pairs
    By jlt199 in forum Excel General
    Replies: 7
    Last Post: 07-10-2018, 12:47 PM
  4. Deduct amount based on sum of distinct values over a period of time...
    By Mesanic in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2017, 12:11 PM
  5. [SOLVED] Calculate the portion of a planned number during a period, based on another time period
    By BryGuy81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2017, 01:29 PM
  6. [SOLVED] Calculate values based on time period
    By rtcwlomax in forum Excel Programming / VBA / Macros
    Replies: 58
    Last Post: 06-30-2015, 05:58 PM
  7. [SOLVED] Complicated:Calculate time period based on no. of units sold + fluctuations within period
    By omaha.crab in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 03:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1