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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Visualize cycle times on clustered column chart where the cycle times are the small multiples?

Hi,

I have the following dataset, which says that to get from A to B, it takes 6 days, from B to C 17 days, etc., and the cycle goes on and on under different PIDS and dates + cycle times.

 

tvadoc_1-1667396599058.png

 

Now, the following result should be similar to this, and I'm saying similar, because this shows years instead of months, and the values are incorrect as well (I took a snapshot from a practice example, hence the values down below).

 

tvadoc_0-1667397585112.png

 

 

As you can see, I need to create measure and timespan selectors, along with cycle day calculations.

So I made a TimeSpan selection, and a MEasure selection table, 

tvadoc_3-1667397334321.png  tvadoc_4-1667397357763.png

And for cycle times, I tried this approach:

 

A to B = SWITCH(TRUE(),
    AND(SELECTEDVALUE('Measure selection'[Measure selection])="Avg",SELECTEDVALUE('TimeSpan selection'[TimeSpan selection])="Days"),CALCULATE(AVERAGE(F_Main[Cycle time (Days)]),F_Main[Attribute]="A"),
    AND(SELECTEDVALUE('Measure selection'[Measure selection])="Avg",SELECTEDVALUE('TimeSpan selection'[TimeSpan selection])="Weeks"),CALCULATE(AVERAGE(F_Main[Cycle time (Days)])/7,F_Main[Attribute]="A"),
    AND(SELECTEDVALUE('Measure selection'[Measure selection])="Avg",SELECTEDVALUE('TimeSpan selection'[TimeSpan selection])="Months"),CALCULATE(AVERAGE(F_Main[Cycle time (Days)])/30,F_Main[Attribute]="A"))
 
Now, what this does, is that if I select AVG and Days, then I get the Average for A to B cycle in Days, and then I'm stuck. How am I supposed to proceed to be able to visualize like the one in the example?

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try:

A to B =
VAR _a =
    SELECTEDVALUE ( 'Measure selection'[Value] )
VAR _b =
    SELECTEDVALUE ( 'TimeSpan selection'[Value] )
VAR _calculate =
    SWITCH (
        TRUE (),
        _a = "Avg",
            CALCULATE (
                AVERAGE ( F_Main[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            ),
        _a = "Min",
            CALCULATE (
                MIN ( 'F_Main'[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            ),
        _a = "Max",
            CALCULATE (
                MAX ( 'F_Main'[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            )
    )
VAR _divide =
    SWITCH ( TRUE (), _b = "Days", 1, _b = "Weeks", 7, _b = "Months", 30 )
RETURN
    _calculate / _divide

Final output:

vjianbolimsft_0-1667453994115.png

vjianbolimsft_1-1667454027883.png

Best Regards,

Jianbo Li

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-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try:

A to B =
VAR _a =
    SELECTEDVALUE ( 'Measure selection'[Value] )
VAR _b =
    SELECTEDVALUE ( 'TimeSpan selection'[Value] )
VAR _calculate =
    SWITCH (
        TRUE (),
        _a = "Avg",
            CALCULATE (
                AVERAGE ( F_Main[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            ),
        _a = "Min",
            CALCULATE (
                MIN ( 'F_Main'[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            ),
        _a = "Max",
            CALCULATE (
                MAX ( 'F_Main'[Cycle time(Days)] ),
                FILTER ( 'F_Main', [Attribute] = "B" )
            )
    )
VAR _divide =
    SWITCH ( TRUE (), _b = "Days", 1, _b = "Weeks", 7, _b = "Months", 30 )
RETURN
    _calculate / _divide

Final output:

vjianbolimsft_0-1667453994115.png

vjianbolimsft_1-1667454027883.png

Best Regards,

Jianbo Li

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

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors