Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
dataSeeker
Frequent Visitor

Showing 12 months of data

I have a Number (Gallons) that i want to divide by 12 and then show the annualized number in a visual by month. The starting month will change.   Is there a way to do this ?

1 ACCEPTED SOLUTION

Hi @dataSeeker,

 

In source table, create a calculated column.

Annualized Gallons = Data_2[Gallons]/12

1.PNG

 

Then, new a calculated table.

Result table =
VAR datedim =
    FILTER (
        CALENDAR ( DATE ( 2019, 4, 1 ), DATE ( 2020, 6, 1 ) ),
        DAY ( [Date] ) = 1
    )
VAR crossjoitablen =
    FILTER (
        CROSSJOIN ( Data_2, datedim ),
        [Date] >= Data_2[Target]
            && YEAR ( [Date] ) = YEAR ( Data_2[Target] )
    )
RETURN
    GROUPBY (
        crossjoitablen,
        [Date],
        "Gallon Potential", SUMX ( CURRENTGROUP (), [Annualized Gallons] )
    )

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
LivioLanzo
Solution Sage
Solution Sage

@dataSeeker 

 

probably yes, but we need more info than that :). Maybe a data sample along with expected results?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Something like this

 

Data Sample

Gallons  Target  Annualized Gallons

12000      4/1/19     1000

24000       5/1/19     2000

6000         8/1/19      500

 

Visual:

Month  Gallon Potential

 April         1000

May           3000

June            3000

July             3000

August        3500

...

April 2020     3500

May               2500

June                 500

 

Hi @dataSeeker,

 

In source table, create a calculated column.

Annualized Gallons = Data_2[Gallons]/12

1.PNG

 

Then, new a calculated table.

Result table =
VAR datedim =
    FILTER (
        CALENDAR ( DATE ( 2019, 4, 1 ), DATE ( 2020, 6, 1 ) ),
        DAY ( [Date] ) = 1
    )
VAR crossjoitablen =
    FILTER (
        CROSSJOIN ( Data_2, datedim ),
        [Date] >= Data_2[Target]
            && YEAR ( [Date] ) = YEAR ( Data_2[Target] )
    )
RETURN
    GROUPBY (
        crossjoitablen,
        [Date],
        "Gallon Potential", SUMX ( CURRENTGROUP (), [Annualized Gallons] )
    )

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.