How can we find recent last login b/w two date login details in Power bi DAX - powerbi-desktop

There is two login details is there, i need to find recent last login b/w two dates from that result date to till date need to find number of months in power bi DAX
Can some one help me please

Related

Create calculated field based on the max of another value in Excel pivot table

I have a pivot table that summarized data from multiple lines of hours on different accounts an employee has planned to work.
I want to have a calculated field that shows the difference between the hours the employee has planned to work and the number of hours authorized for an employee to work for the year.
The number of hours authorized is different for certain employees.
I am currently using a helper field in my pivot table and xlookup to another employee authorized hours table to add the authorized hours on each of the lines in the source data.
I can get the table to display the correct authorized hours using the "max of" but I don't know how to calculate the difference by either modifying the table, or using calculated fields.
Any ideas appreciated.

Cognos Query to calculate a run date

So in my Cognos report I have a column 'Last Separation Date'. I want run a query on that column to calculate to all persons currently employed or separated from employment within the last two years. However, this date query should auto run to the day I'm running the report. For example. I run the report today 2/22/2020 and view data for the last two year till 2/22/2018. I login few days later to view the report on 3/1/2020. The report should pull data from 3/1/2018.
Create a filter with the between function using current date and some expression which determines a date two years in the past.
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.ca_mdlg.doc/c_sql99_current_date.html#sql99_current_date
_add_years or _add_days might be handy as they take negative numbers.
Using the previous answers suggestions, your detail filter would be similar to
[Last Separation Date] between current_date and _add_years(current_date,-2)

Excel MDX - Count of dates selected in slicer

I'm using Excel to connect to an OLAP cube and building a report to show actual hours charged to a project. I need to create a measure now to perform some calculation on the actual hours for which I need to get the number of days that the user is filtering on. The date range is added as a slicer. Is there a way to do this? I've tried
Count(Existing [Work Item].[System_CreatedDate].members)
But this returns all created dates in the entire data set. I only need a count of the ones the user has filtered on. Right now it should return 66 or so since I've set it to 1/1/2014 to 3/7/2014 but I'm getting back 503 which is how many members there are in total in the OLAP cube not taking into account any filters I have set.
My apologies for the basic question and the inadequate explanation of what I'm trying to get to. I have very limited experience with MDX and measures / members. I hope the question is clear enough.
Help will be truly appreciated.
Thanks.

Attendance Calculations / Period Calendar

This is a multi-tiered project. Let me give a quick overview. I have attendance data, card/ timestamp punches. I would like to have a pivot table with slicers in Excel. Ideally you'd be able to choose a department / last name / associate number. And also a period of time. Ideally this would be a table with the company period/week. And maybe default to last weeks.
I can get at timecard data in two ways:
(1) generate a CSV that automatically performs the timecard math, to figure out how many hours someone worked and it is smart enough to understand 3rd shift workers. The format of that CSV is:
Last Name, First Name, Personnel Type, Associate Number, Facility, Department, TimeIn, TimeOut, Total Hours
The problem with this method is that I would have to manually append the information to the CSV tables. Or come up with some autoIT script.
(2) Get at the raw data via sql/odbc. This way the math is not done. It is just all of the associates timestamps. I would have to figure up the daily hours myself and figure out a 3rd shift formula too. It is not a set schedule, many people swing shifts and others get called in a lot.
Lastly, I would like to be able to filter the dates by using our company fiscal calendar. I have a spreadsheet that goes from 2000 to 2093. With everyday listed and it's corresponding year/period/week.
Example period info spreadsheet:
date Year Period week WeekTotal Period Total
12/3/2007 2008 1 1 2008.1.1 2008.1
12/4/2007 2008 1 1 2008.1.1 2008.1
I know there is a lot going on here, but what would be the best way to approach this project?
First I have not been able to post any script however the last I tried it I used two options 1. Was a php conversion where the time was numbers ( which makes it easier for calculations)
2. Was in the tables where I deliberately entered the values places the time in different columns or fields for hours, mins, and seconds this meant that while the input is eased I still have to calculate the output in php especially for totals, averages and differences.
Hope it helps a bit

Listing values regardless of prompt selection

I currently have a cognos report with 3 pages:
Monthly Summary
Monthly Detailed
Full Year Trend
The month is determined by a value prompt. My question is: How can I make it so the 3rd report page ignores the Month paramvalue and shows all 12 months regardless of the value prompt? So if June, for example, was picked the first two reports would show only June but the full year trend would show January to December.
Currently the prompt works fine for the two other reports but I can't figure out how to make the third page show the same data everytime.
Thanks,
lostintern
It will get tricky towards year-end/beginning, but anyhow ... Extract the value of Year from your prompt and use it as a filter for your third page query.

Resources