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
RashmitaR
Helper IV
Helper IV

Dax Query

Hi could anyone suggest me a way to obtain this . Need to obtain headcount of the releases expected in the next three months (ex : If i select feb 2016 in my filter i must obtain data for march-16 , april-16 and may-16) .
11 REPLIES 11
walnei
Helper III
Helper III

 

Hello Friend.


You can create an auxiliary table and make a relationship to make this filter as image

 

TABLE REL.png

 

 

 

 

 

 

 

 

 

#PowerBI Seeking Leadership
Brazilian hug
IF YOU ARE RIGHT, MARK AS ANSWER TO GUIDE TO OTHER

Baskar
Resident Rockstar
Resident Rockstar

Hi walnei

 

1. we can do what u mention , my question is if i want another 6 month ? have to do change again right ?

2. i didn't get you , how u going to give relationship between these tables ? , bec the basic relationship in cardinality column should have one unique value right ? then how can u....

 

 

Baskar
Resident Rockstar
Resident Rockstar

Hi

 

Can please give little bit clarity .

 

Based on my understanding , if select Mar 16 in filter u want next three month data in report ?

@Bhaskar yes thats right

i have to say sorry here.

 

bec we can do like this in dimension level, see the logic here

 

if u selected one value in filter, what it will happen ? surely i will give only selected value in visual right.

 

then how can we show remaining dimension in the visual.

 

 

if your question based on measure we can do in dax. 

 

Upto to my knowledge we can do this in DAX...

Sorry

@RashmitaR

 

Your requirement is still not clear for me. If you‘d like to get the resignation headcount in the next 3 months of each month, you can reference the attached pbix.

 

捕获.PNG

Hi @Eric_Zhang Your solution has help but there is a slight difference between the result obtained and the result i am looking for . I actually want to obtain the following result once i filter feb-16 Project name March-16 april-16 may-16 A 12 15 20 B 22 20 02


@RashmitaR wrote:
Hi @Eric_Zhang Your solution has help but there is a slight difference between the result obtained and the result i am looking for . I actually want to obtain the following result once i filter feb-16 Project name March-16 april-16 may-16 A 12 15 20 B 22 20 02

@RashmitaR

 

I can't get your idea. I don't know about your data so the result " once i filter feb-16 Project name March-16 april-16 may-16 A 12 15 20 B 22 20 02" makes no sense to me.

Regarding restriction, you can upload some dummy data instead of the real data.

Hi @Eric_Zhang I am unable to find the attachment option in power bi community .also let me try and explain you my requirement once again.I need the head count of the employees whose release dates are in the coming three months.As currently Its June , I would need the head count of employees whose release date is in between 1st july and 30th july in a separate column,employee released between 1st august and 31st august in a separate column and employee released between 1st September and 30 September in a separate column. I hope this might help you understand my requirement. Thank you.

HI @Eric_Zhang I am restricted to very limited access, unable to upload images or attach docs.As I said earlier need to obtain headcount of the releases expected in the next three months. example: if i select today 14th june i must see the headcount of the releases in next three months i.e July,Aug and september based on employee effective start date and effective end date. ResignationHCinNext3Months = CALCULATE(IF(ISBLANK(COUNTA(F_RR_SUPPLY_DETAIL[EMPL_ID])),0,COUNTA(F_RR_SUPPLY_DETAIL[EMPL_ID])),DATESINPERIOD(F_RR_SUPPLY_DETAIL[EFFECTIVE_START_DATE],MAX([EFFECTIVE_END_DATE])+1,+3,MONTH)) I tried to modify your query but experiencing some error.Please let me know if you need any further clarification.

@Eric_Zhang I couldn't attach the file due to some restrictions .Kindly press enter after may-16 and before B to get the alignment I wished to show you. Thanks

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.