cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PR20048119 Member
Member

Measure showing wrong calculation

Hi,

I have tables fact,dim1,dim2 and dim1 and dim2 have relationship with fact.

My measure is Loc_Count=Calculate(Distinctcount('dim1'[col1])),filter('dim2','dim2'[Date]>Selectedvalue('Date'[st_DT])))

 

Date[ST_dt] is a slicer.and Date and Dim2 have relationship on Date[ST_DT] nad 'dim2'[Date].

So when i select particular date it filters the table2 but it is not filtering table1.

 

Col1 has 1,2,3 distinct value so it is giving 3 output.

 

But in table if u drag Col1 and dim2[Date] it is showing zero records as my Fact is empty.

So i need output blank or 0  when user selects the date.cause i dont have data in fact.

I don't know why it is not filtering table1 as well cause dim1 and dim2 have relationship.

4 REPLIES 4
Super User
Super User

Re: Measure showing wrong calculation

@PR20048119 you have provided lot of info but still missing important info on your post.

 

Can you share relationship diagram and what you want your output to be?






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





PR20048119 Member
Member

Re: Measure showing wrong calculation

11.PNGSee i have 3 tables one is provider having provider id and another is proivder network having effective date and term. date and i created manually date table with start date and end date columns and is mapped on effective date and start date

PR20048119 Member
Member

Re: Measure showing wrong calculation

12.PNGif i drag provider_id and effective date in same table visual it is showing blank. But measure is showing 3

PR20048119 Member
Member

Re: Measure showing wrong calculation

So i need dax which count distinct proivder ids when effective and termination date is in range of selected date values by user

Helpful resources

Announcements
New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,770)