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
HiriKiri
Frequent Visitor

Display average value from previous Year/Quarter/Month if current is empty

Good day everyone.

 

I'm new in Power Bi, so hope for your help 🙂

 

I have a line chart that displays a few average values by dates (X-axis - DateTime column, Y-axis - a few other columns with selected 'Average' option)

I use Categorical type, so the point is missing if there is no data in appropriate datetime interval:

 

HiriKiri_0-1663147757391.png

 

HiriKiri_1-1663147886538.png

 

I have to replace this logic to display data from previous Year/Quarter/Month (due to selected Hierarchy level) in case if current is empty to avoid these 'gaps'.

As I understand, I have to use Measure, but I've tried to use something like this: Measure = IF(ISBLANK(AVERAGE(Table[Value3])), 0, AVERAGE(Table[Value3]))

And i can't understand what should be instead of '0' to get previous calculation data (due to screen, in 2021 Qtr3 should be displayed '2' (Average value from 2021 Qtr2), so 2021 Qtr2, 2021 Qtr 3 and 2022 Qtr3 will be connected without gaps)

 

Could someone help me with this moment (or maybe there is exists another solution)?

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @HiriKiri ,

 

Please provide some sample data.

 

Hi @v-kkf-msft ,

My bad. Forgot about this)

Here is some data:

HiriKiri_0-1663228439776.png

 

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.