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

Chart with column and line value - only see specific value

Hello everyone,

I am creating a Line and clustered column chart with

  • a shared axis which shows period of time (P1-2020, P2-2020, ...)
  • column values for actual costs
  • line values for planned costs

Is there way to only see the actual costs for specific periods and the planned costs for other specific periods?

Thanks

1 ACCEPTED SOLUTION

Hi @rodieade ,

 

Create a new table for slicer:

 

Table1 = VALUES('Table'[Time])

 

 

Create the following measure for actual costs and planned costs

 

actual costs = IF(MAX('Table'[Time]) in DISTINCT(Table1[Time]),VALUES('Table'[actual costs]),BLANK())

planned costs = IF(HASONEVALUE(Table1[Time]),IF(MAX('Table'[Time]) in DISTINCT('Table1'[Time]),BLANK(),VALUES('Table'[planned costs])),VALUES('Table'[planned costs]))

 

 

Capture2.PNG

 

Please refer to the pbix file: https://qiuyunus-my.sharepoint.com/personal/pbipro_qiuyunus_onmicrosoft_com/_layouts/15/onedrive.asp...

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@rodieade , return blank() for the periods you do want to show the values

Not sure I got you?

because even the values with 0 appear on the chart.

Hi @rodieade ,

 

Create a new table for slicer:

 

Table1 = VALUES('Table'[Time])

 

 

Create the following measure for actual costs and planned costs

 

actual costs = IF(MAX('Table'[Time]) in DISTINCT(Table1[Time]),VALUES('Table'[actual costs]),BLANK())

planned costs = IF(HASONEVALUE(Table1[Time]),IF(MAX('Table'[Time]) in DISTINCT('Table1'[Time]),BLANK(),VALUES('Table'[planned costs])),VALUES('Table'[planned costs]))

 

 

Capture2.PNG

 

Please refer to the pbix file: https://qiuyunus-my.sharepoint.com/personal/pbipro_qiuyunus_onmicrosoft_com/_layouts/15/onedrive.asp...

 

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

 

Best Regards,

Dedmon Dai

 

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.