Next Refresh Date Visual in power bi - powerbi

I want to place a visual on the report which shows next refresh date. By 15th of every month to be precise. How to do that in power bi?

The refresh of a dataset is totally unrelated to the data shown. You can't foresee the future and predict when it will be refreshed. The only thing you can show is, when the refresh is planned. At any point in time you can change the refresh schedule, or manually refresh the dataset. So you can put a field showing the 15th of the current or next month, but it isn't guaranteed the next refresh will happen.
This can be easily done by a field in your database, or with DAX expression like this:
=IF(DAY(TODAY()) < 15,
DATE(YEAR(TODAY()), MONTH(TODAY()), 15),
DATEADD(DATE(YEAR(TODAY()), MONTH(TODAY()), 15), 1, month))

Related

Get Previous Month Data - Power BI

I need support of yours for my query.
Currently i have set of records which includes date column as well.
Here on click of a button, i need to check current date and show previous 30 days data.
If any one give me idea on how to do this in Power Bi it will be really helpful.
Thanks

How do I hold a slicer selection static in Power BI / DAX?

I can illustrate the issue here in Power BI. I need the selection on Date to stay static.
We audit widgets every day and look for certain quality control "issues". I have a slicer on Audit Date, and a calculation meant to return the Total Number of Distinct Units Audited within that date range. The correct value is 413 for May 17 - June 2.
However when I select a Quality Control Issue from the list, it changes my calculation. The calculation should NOT be affected by a selection on Issue, however it’s putting in an “Included” filter and then throwing out days where we didn’t audit a widget with that particular issue – see how 5/17, 5/20 and 5/23 dropped from the list whenever I click "Dent" in the table? However 413 correctly remains in the table.
I need the calculation to return 413, even when Issues are selected from a slicer or table. I thought I addressed the with the ALL() filter, but it's not behaving as I expected it to.
Note: I need to alter the CALCULATION – NOT the INTERACTIONS. The calculation is used outside of visuals.
Thank you.
Either turn of Visual Interactions in the report, or write a measure using the mighty CALCULATE function to ignore selected filters.
Once you've removed the filters you can re-apply any you want to keep, eg
totalunitsaudited =
var minDate = min('Date'[Date])
var maxDate = max('Date'[Date])
return
calculate(DISTINCTCOUNTNOBLANK(Audits[SerialNo]),
all(Audits),
Audits[Audit Date] >= minDate && Audits[Audit Date] <= maxDate)
Also here you need a date table. You can create one with the CALENDARAUTO DAX function:
Date = CALENDARAUTO()
When you put the slicer on the Audits[Audit Date] you've got automatic cross-filtering between the date and the Issue. With the slicer on a separate date table you can control whether filters on Audits flow back to the Date table.

How can I display months without no data?

I follow the following blog http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-powe... in order to display Display Last N Months & Selected Month using Single Date Dimension in Power BI.
I've an issue when trying to display month-year when there is no data in the fact table sales.
I did modification: https://1drv.ms/u/s!Amd7BXzYs7AVg3xJ1MKPYI_PIw3z
How to show to show for example October, november and december 2015 as an example?
I downloaded your PBIX file and looked through it.
I am unsure what you exactly want to see, because your report has a few quirks in it.
I'll try to sum them up:
You have a 'select month' drop down menu ánd a slider for selecting the number of months (As 'sales for last x months). This doesn't work. Since you now need to manually select the wanted months in the drop down menu with CTRL+Click (On each month) ánd you need to use the slider.
Next to that, your calculations seem to be wrong. If I only select Dec-16 I get 70. If I select Nov-16 and Dec-16, the sales in Dec-16 suddenly become 70 and Nov-16 takes over. If I select until July-16, July-16 gets 70 and Dec-16 gets 120.. I don't know if this is how you want it but it looks like strange behaviour.
A good tip for measures. If you sum, divide or do any calculation. End with +0. That way you wont see (Blank) but 0. E.g.
Sales (Selected Month) = SUM(Sales[Sales]) + 0
Also, you have made a small date table, which is good. But you don't use this consistently through your report. For selecting months you use the date table and for the graph you use the date in the sales table. It is better to use the date table for dates, since that is it's sole purpose.

Power BI Desktop - Relative Date Slicer Defaulting to Days

Hoping this is a simple one to resolve.
I have a dataset, a SQL View, with the data imported into my PBIX. I have a date slicer and a number of tables, matrices and charts, over 2 pages. All update whenever I change my slicer, great.
One of my charts needs to show the last 12 months only. I choose Relative Date Filtering from the Visual level filters, select "is in the last", 12 and months from the various drop-downs. When I click Apply filter, my chart goes blank, even though there is data. When I click off the chart and back on again, the drop-down has changed to Days, not months. I have tried with various different options and always defaults back to days.
My Date field is definitely a Date. I have also tried adding a Date table and using that date too but the same thing happens.
Is it me or is there a bug?
Thanks

Calculate rates from previous month based on current month in order to make then visually comparable

Maybe this is an easy one but since I’m very new in DAX and PowerBI I can’t figure it out. My database has daily data ranging from MAY/17 to JUN/17 (and it’ll still going in the future). It has information of DATE, DAY, YRMTH (year-month), QT_APRV (approved customers) and QT_TOTAL (total consumers). Sample below (using Excel just to be quicker):
I wanted to create in PowerBI a bar chart with QT_TOTAL per day and a line chart with approved rate of consumer. For the rate, I used:
APPRV_RT = SUM(database[QT_APRV]/SUM(database[QT_TOTAL])
And then, selecting only a month by time in the chart (just like I want), I have:
Perfect, but now I want to create a new line chart, showing the approved rate in each respective day of the last month. Using my example, when june data are select, the first line chart has to show the daily approved rate of june AND the other the approved rate of may, in order to make it comparable (june1 -> may1; june12 -> may12 and so on). Here’s what I want:
How to make this automatically, in order to make each month comparable with the previous? I thought about some DAX formula involving a sum with filtering current month minus 1, I don’t know how to do it.
Any ideas?
UPDATE (07/08/2017)
I tried what Rasmus Dybkjær suggested me, and I thing I'm in the right path.
APPROVED_RATE_PREVIOUS_MONTH = CALCULATE([APPROVED_RATE_CURRENT_MONTH];PARALLELPERIOD(dCalendario[DataBase];-1;MONTH))
However, it returned the approved rate from the previous month as a whole (67,0% in May), not each day as I wanted:
Any suggestions?
You should be able to use the DAX function called PARALLELPERIOD() for this purpose. The PARALLELPERIOD() function takes a date column and shifts it a number of periods back or forward.
For example, you could use it like this to calculate your approved rate shifted one month back:
ApprovedRateLM =
CALCULATE(
DIVIDE(
SUM(database[QT_APRV]),
SUM(database[QT_TOTAL])
),
PARALLELPERIOD(database[Date],-1,month)
)
Note that it is important that your [Date] column contains a date type. Otherwise the PARALLELPERIOD function will not work.