Forum Discussion
KPI visual in Power BI
If your requirement is using the DAX formula u mentioned above, then
Try joining the Date field of your fact table, with date dimension.
Then perform the calculation. Let me know if it works.
Thanks Anonymous and Sean for your inputs.
I need not to have a trend, just need to have a comparison with current value with the previous year. and shows the variance value. How to implement that in Power BI dekstop with the arrows (red or green) which changes dynamically based on the variance.
Below is
I am trying to use the the KPI visual which is there in out of the box.
I have calculated a measure
lastPeriodValArr:=CALCULATE(
COUNTROWS('Arrival')
,SAMEPERIODLASTYEAR('Date'[Date])
,AllExcept('Date', 'Date'[Date])
)
I have added Month_Name in trend.
Value: Current duration value
Target: Above measure
It looks fine (we need to select some year to claculate the previous year), Actually Dashboard shows all the values (not filters any year) at load and this KPI shows error since user not selected any year or any filter which calculates lastyearperiodvalue.
Error: "SAMEPERIODLASTYEAR only works with contiguous date selection."
Br,
Shamsuddeen
- Sean10 years ago
Community Champion
shamsuddeenvp Are you trying to do Month on Month? Why are you using Month_Name in trend?
And even then you should use year - just change the Measures.
Also it seems you are desribing either a custom Visual or KPIs imported from PowerPivot like this..
See my answer here...
- shamsuddeenvp10 years ago
Post Patron
Thanks Sean
Yes, I need to show the trend by month. still I need to keep year in trend field?
Actually my requirement is that I need to show a trend graph in a way that what is the total sales this month and compare the value with previous year same perid sales.
Other screenshot you mentioned also useful for my requirement to show all the months variance between current value and previous year value in table format, however that would need to create KPI in powerpivot or in SSAS tabular model right?
Thanks!
Shamsuddeen
- Sean10 years ago
Community Champion
shamsuddeenvp Yes to both quesitions.
I would consider using a different visual - you don't have that much flexibility with the built in KPI
Look the charts look the same shape but the PBI built-in KPI will give you pretty much no details...