How to append current and previous sessions side by side filtered by two independent slicers

<strong>Objective:</strong>&nbsp;I would like obtain the difference between current and previous sessions based on date slicers I want the output to be 4 columns as such:

Objective: I would like obtain the difference between current and previous sessions based on date slicers I want the output to be 4 columns as such:

  • Date
  • Current Sessions (see measure below)
  • Previous Sessions (see measure below)
  • Difference (no measure calculated yet).

Situation: I currently have two measures

  • Current Sessions: SUM(Sales[Sessions])
  • Previous Sessions (thanks to @Alexis Olson):
VAR datediffs = DATEDIFF( CALCULATE (MAX ( 'Date'[Date] ) ), CALCULATE (MAX ('Previous Date'[Date])), DAY ) RETURN CALCULATE(SUM(Sales[Sessions]), USERELATIONSHIP('Previous Date'[Date],'Date'[Date]), DATEADD('Date'[Date],datediffs,DAY) )

I have three tables.

  • Sales
  • Date
  • Previous Date (carbon copy of Date table)

My previous date table is 1:1 inactive relationship with the Date table. Date table is 1 to many active relationship with my Sales Table.

I have two slicers at all time comparing the same amount of days from different time periods (e.g. Jan 1th to Jan 7th 2019 vs Dec 25st to Dec 31th 2019) If i put current sessions, previous sessions and a date column from any of the three tables

+----------+------------------+-------------------+------------+
|   date   | current sessions | previous sessions | difference |
+----------+------------------+-------------------+------------+
| Jan 8th  |            10000 |             70000 |       3000 |
| Jan 9th  |            20000 |             10000 |      10000 |
| Jan 10th |            15000 |             16000 |      -1000 |
| Jan 11th |            14000 |             12000 |       2000 |
| Jan 12th |            12000 |             14000 |      -2000 |
| Jan 13th |            11000 |             16000 |      -5000 |
| Jan 14th |            15000 |             18000 |      -3000 |
+----------+------------------+-------------------+------------+

When I put the Sessions date on the table along with sessions and previous sessions, I get the sessions amounts right for each day but the previous session amounts doesn't calculate correctly I assume because its being filtered by the date rows.

How can I override that table filter and force it to get the exact previous sessions amounts? Basically have both results appended to each other.The following shows my problem. the previous session is the same on each day and is basically the amount of dec 31st jan 2018 because the max date is different for each row but I want it to be based on the slicer. 


migrate power bi collection to power bi embeded

I tried to follow the article to migrate power bi collection to power bi embedded (<a href="https://docs.microsoft.com/en-us/power-bi/developer/migrate-from-powerbi-embedded" target="_blank">msdn article here</a>). However, I got stuck very quickly.

I tried to follow the article to migrate power bi collection to power bi embedded (msdn article here). However, I got stuck very quickly.

For example, in our app, we use these nuget packages (Microsoft.PowerBI.Api and powerbi.core), and these are some of our usages:

client.Reports.GetReportsAsync(this.workspaceCollection, this.workspaceId)

client.Reports.DeleteReportAsync(this.workspaceCollection, this.workspaceId, report.Id);

client.Imports.PostImportFileWithHttpMessage(this.workspaceCollection,this.workspaceId,File.OpenRead(localPath), "Main Report");

client.Datasets.GetGatewayDatasourcesAsync(workspaceCollection, workspaceId, dataset.Id);

client.Gateways.PatchDatasourceAsync(workspaceCollection,workspaceId,datasources.Value[0].GatewayId,datasources.Value[0].Id,
delta);

client.Datasets.GetDatasetsAsync(workspaceCollection, workspaceId);

I can download all reports and move to power BI embedded, but as workspace collection will be retired, will we still be able to use above methods? If not, are there any alternative functions to use?

Power BI to users without Power BI

So I've asked a similar question, but I thought I'd ask it more generally to get as many ideas as possible.

So I've asked a similar question, but I thought I'd ask it more generally to get as many ideas as possible.

I have Power BI Pro. I am tasked with creating reports for hundreds of recipients, each one personalized to that specific user.

My organization will not pay out for everyone else to have Power BI enabled, although everyone will have an O365 account.

How do I share my reports created in Power BI to users without Power BI? Factoring in there are several hundred of them to produce every week by a team of 2 people.

Thanks in advance!

Learn Power BI | What is Power BI | Power BI Training | Intellipaat

Learn Power BI | What is Power BI | Power BI Training | Intellipaat

🔥Intellipaat Power BI training course: https://intellipaat.com/power-bi-training/ #learnpowerbi #powerbitraining #powerbifullcourse #whatispowerbi 📌 Do subsc...

Why should you watch this Power BI video?

You can learn Power BI much faster than any other BI tool and this power bi tutorial helps you do just that. This Intellipaat power bi
tutorial for beginners will familiarize you with the various BI reporting concepts. Power BI is one of the best reporting advances that is finding increased applications for data visualization in a lot of industry domains. Our Power BI training course has been created with extensive inputs from the industry experts so that you can learn Power BI and apply it for real world scenarios.

Why should you opt for a Power BI career?

Today every business enterprise and department needs extensive business insights and Power BI puts the power in your hands. You can easily work with multiple sources of data, convert it into a report, graph, or data visualization of your choice. Get real-time insights and deploy it faster than any other BI tool available in the market. It is open source and highly intuitive and does not need technical knowledge or IT support.