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
praveenpasila
Advocate IV
Advocate IV

percentage problem giving wrong results

Hi All,

I am trying to achieve a simple problem but seems to be complex

Two points I am struggling with are
1. Use one single date to filter muliple data columns in different tables
2. To create yearly, monthly, weekly and daily percentage difference based on a dimension column (Ex Category)

We have multiple dimension tables and trying to create measure count(column) and its working fine individually.

also have multiple date columns and wanted to create a date table to filter different tables

Created a date table using calendar auto funtion (Dates[Date])

Is there a way to create a column or meausre to filter multiple date columns with single date.

because I cant join this date table to different dimension tables its showing inactive and only one active connection may be there is an indirect relationship between tables


For problem 1 I tried below but seems to not work when I add measures from tables its giving same result

Filter Date =
var MinDate = min(Dates[Date])
var MaxDate= max(Dates[Date])

RETURN
IF(OR(FIRSTDATE(Table1[Date]) > MaxDate, LASTDATE(Table1[Date]) < MinDate),0,1)

 

For problem 2 month percentage tried below also not working

MTD = CALCULATE(COUNT(Table[Name]),DATESMTD(Dates[Date]))
last MTD = CALCULATE(count(Table[Name]),DATESMTD(DATEADD(Dates[Date],-1,MONTH)))
diff% = DIVIDE([MTD]-[last MTD],[last MTD])

Also used parallel period function, previous month nothing wokred

 

Can someone please suggest. Thank you in advance

@v-eqin-msft 

 

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @praveenpasila 

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

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.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. I cannot help you without meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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.