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
YunJ
Post Prodigy
Post Prodigy

How to ignore relationship and create new measure based on new condition?

Hi,

I have a relationship on Date between these two datasets. I cannot delete it because I have a few charts use "Date" from Date datasets.

2.png

However, in this bar chart, I don't want to use this relationship. For example, When slicer Store="LRL FSS", Campaign="618", I would like to show x-axis as 2020.06.01~2020.06.30, when choosing other content from sclicer Store and Campaign, the x-axis data range will change.

But in this case, when I wrote measure like the following, the end date shown on the x-axis is 2020.06.21, which is based on the date to date relationship from my first picture. 

So I'm wondering can it show as 2020.06.30 rather than 2020.06.21.

1.png

Another problem is, the date label on the x-axis can not show completely, why only show these three labels?

3.png

Please find attached my pbix file.

https://www.dropbox.com/s/2i3y5mttdh0vibz/test.pbix?dl=0

Not sure whether I'm expressing understood. Please let me know if there is any confusing. Thanks a lot for your time!

 

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Hi  @YunJ  ,

Displayed as 2020.06.30:

1. Put Date into Filters for manual filtering:

v-yangliu-msft_0-1610587393882.jpeg

2. Open Show items with no data

v-yangliu-msft_1-1610587393886.jpeg

3. Result:

v-yangliu-msft_2-1610587393888.jpeg

The date label on the x-axis cannot be displayed completely, you can choose this:

X axis – Type –Categorical
v-yangliu-msft_3-1610587393890.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

hi @v-yangliu-msft 

I can't put Date into Filters for manual filtering because when other contents in slicer Store/Campaign are selected, the date will change. For example, when selecting slicer Store="LRL MU" and Campaign="38", the date shown will start from 2020.03.01 to 2020.03.15.

 

Thanks for your time.

Hi  @YunJ ,

You try to manually filter dates only on the  bar chart.

 

Best Regards,

Liu Yang

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

Yes... the date on the bar chart will change based on what contents in the slicers I select... 

amitchandak
Super User
Super User

@YunJ , You can use all or crossfilter (with none) to remove the relationship.

https://docs.microsoft.com/en-us/dax/crossfilter-function

 

But if you want display date still , you might have use one more table

 

try crossfilter(Date[Date], campaign[date],none) - add this in calculate . - refer- https://youtu.be/e6Y-l_JtCq4

 

In case that does work, this is approach you have to take - https://www.youtube.com/watch?v=duMSovyosXE

Hi @amitchandak 

Thanks for your reply. I tried as the following screenshot. But the new measures seems like totally the same, and the date is not ended with 2020.06.30... May I know the reason?

1.png2.png

Thanks for your time!

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.