cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Magistralis
Frequent Visitor

Data visualization for period of time (e.g. only for 3 months),

Good day beautiful people,

 

I have a problem how to create a visualization for below tables.

 

Main:

Magistralis_1-1656000105403.png 

Helper:

Magistralis_2-1656000118622.png

 

Formulas:

Start Date = 64 + Days Frozen + Posting Start Date

Latest Active Date = IF(End Date = blank, Today(), End Date)

 

Result:

What I would like to show, is a colum chart where month by month my data will be presented. 

If my ID's Start Date is 3/18/2018 and Latest Adctive Date is 6/23/2022, I would like to show this ID in March, April, May and June.

For second example, SD 4/6/2022 and LAD 5/23/2022 I would like to show this in April and May only.

 

Start Date won't be higher than a Latest Active Date.

 

I have tried below formula:

 

_Visiu1b =
CALCULATE(
                   COUNT(Table1[ID]),
                   FILTER(Table1,
                                    Table1[Start Date] <= max('Calendar'[Date]) &&
                                    Table1[Latest Active Date] >= min('Calendar'[Date])
                              )
                     )
 
Calendar[Date] is a column with dates day by day, starting 1/1/2018 - 12/31/2023


For now I was able to present it only for SD's month or LAD's month which is absulutely not correct since in some cases I need multiple months.

 

(example screens were added from excel, since it was faster for me to create a sample)

 

 

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Magistralis 

 

Please try the following methods.

Table 1 = 
SUMMARIZE (
    'Table',
    'Table'[ID],
    "Start Date",
        64 + SELECTEDVALUE ( 'Table'[Days Frozen] )
            + SELECTEDVALUE ( 'Table'[Posting Start Date] ),
    "Latest Active Date",
        IF (
            SELECTEDVALUE ( 'Table'[End Date] ) = BLANK (),
            TODAY (),
            SELECTEDVALUE ( 'Table'[End Date] )
        )
)

vzhangti_0-1656323615157.png

_Visiu1b = 
CALCULATE(COUNT('Table 1'[ID]),
                   FILTER('Table 1',
                                    [Start Date] <= max('Calendar'[Date]) &&
                                    [Latest Active Date] >= min('Calendar'[Date])
                              )
                     )

vzhangti_1-1656323691123.pngvzhangti_2-1656323704309.png

 

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Magistralis 

 

Please try the following methods.

Table 1 = 
SUMMARIZE (
    'Table',
    'Table'[ID],
    "Start Date",
        64 + SELECTEDVALUE ( 'Table'[Days Frozen] )
            + SELECTEDVALUE ( 'Table'[Posting Start Date] ),
    "Latest Active Date",
        IF (
            SELECTEDVALUE ( 'Table'[End Date] ) = BLANK (),
            TODAY (),
            SELECTEDVALUE ( 'Table'[End Date] )
        )
)

vzhangti_0-1656323615157.png

_Visiu1b = 
CALCULATE(COUNT('Table 1'[ID]),
                   FILTER('Table 1',
                                    [Start Date] <= max('Calendar'[Date]) &&
                                    [Latest Active Date] >= min('Calendar'[Date])
                              )
                     )

vzhangti_1-1656323691123.pngvzhangti_2-1656323704309.png

 

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors