PowerBI - Adding target ROW into matrix - powerbi

I have matrix visual and im trying to add a target as ROW in that matrix as the below image:
Any Ideas how to create this view before the actual values?
I have searched alot to achieve this but couldnt find any helpful results.
Thank you in advance

you can use the below code but you may need to revise the data types...
Modelling--> New Table
new table =
UNION(
'YourTableName'
, ROW(
"SLA/KPI", "Target"
,"Incoming", "-"
,"Completed", "-"
,"AHT", "<15 mins"
,"QA", ">95%"
)
)

Related

Returning the first result of an table

I'm struggling within DAX to find a formula to return the first result. My table is as folllows:
The unique column is Dim_B_ID. So what I really would like to have is to return the first result of Amount ONLY for Dim_B_ID where the column IN is not blank. Im struggling cause I get answers like 3500 (total of the rows) and I can't seem to integrate IF(NOT(ISBLANK( funtion into this. So if someone has a solution for me, I would really appreciate it as I'm not so much of an expert in DAX.
You could try using the following measure:
FirstNonBlank =
FIRSTNONBLANKVALUE(
'Table'[Dim_Date_ID],
SUM( 'Table'[IN] )
)
When put together with Dim_B_ID in a table for example you could visualize FirstNonBlank for every "categorie" like so:
Used slightly modified sample data here:

How to remove blank data in Bar chart in PowerBI?

Hi everyone,
I want to remove the first bar (Blank) from the bar chart and the data label will recalculate the % by excluding the blank data. The reason why there are some blank data is because there are some data missing for some students. The DAX formula that I used to categorized the students into different % group is:
RankCategory =
VAR CatVar=[Success_Rate]
RETURN CALCULATE (VALUES ( BenchMark[Category]), CatVar>BenchMark[Lower_Level],CatVar<=BenchMark[Upper_Level])
May I know how should I modify in my Bar chart or modify the DAX formula so that it can achieve my goal? Any help or advise will be greatly appreciated!
You can apply a visual level advance filter as shown below-
Use the following method to suppress the NULL bars in Power BI:
Click the visual
Select the paint icon on the left
Change the X axis to "Categorical"

PowerBI - weekly share by col

I´m trying to build a new measure, that show the share of "E_RATPROM"(numerical col) by "NombreCanal" and "fecha_ini_semana" defined by:
fecha_ini_semana = 'calendar'[Date]-WEEKDAY('calendar'[Date],3)
i´m working in a solution using AllExcept or AllSelected, but still cannot build it yet.
i'll appreciate any help..thanks in advance
***Update
i´ve tried the solution of Joao, but the measures dont return as expected;
***Update 2
The issue was im using an aditional column for order, so this column had to be in the ALL expression..like Joao mentioned...
To calculate your total per week, you need to ignore any filters on NombreCanal:
// Measure 1
E_RATPROM Total = SUM('mpq_comercial mqp_sales_bloques'[E_RATPROM])
// Measure 2
total_semana = CALCULATE([E_RATPROM Total], ALL('mpq_comercial mqp_sales_bloques'[NombreCanal])
// Measure 3
ratio = DIVIDE([E_RATPROM Total], [total_semana])

Consolidate filter and measure?

Is there a better way of trying to filter a table and apply a average to the filtered results?
Currently research online articles has brought me to creating a virtual table (CALCULATETABLE) and then a separate measure to AVERAGE the column value I require.
Filtered Table below
filtered_table = CALCULATETABLE ('ReportRawFigures',
ReportRawFigures[days_since_completed] < 29,
ReportRawFigures[3rd_party] = "Bloggs",
ISBLANK(ReportRawFigures[time_to_complete]) = FALSE(),
ISBLANK(ReportRawFigures[last_confirmed_issue]) = FALSE(),
ReportRawFigures[issue_status] = "")
Then a simple measure added:
average = AVERAGE(filtered_table[column])
I'm not very bright... I figured it out.
You create the filtered table, then when you build you visual you simply select the column and chose to average its output..
Hope this helps anyone looking like I first did.

Power BI why circular dependency is detected

Can you please explain why I run into this alert message of circular dependency when I try to create relationship between dimension #product (or #region) and a #bridge table which is a Cartesian of product x region?
I have connected #bridge with Sales and Budget by single column P#G witch is concatenation of product and region.
Download file here: PBIX
The solution is simple. Do not use CALCULATE function in the DAX bridge tables. Instead add all that columns to the same table later as calculated columns.
I changed the original code of the bridge table which was:
ADDCOLUMNS (
CROSSJOIN ( '#product', '#region' ),
"P#R", COMBINEVALUES("#",'#product'[product], '#region'[region]),
"sales", CALCULATE ( SUM ( Budget[target] ) ),
"IsSale", IF ( CALCULATE ( SUM ( Budget[target] ) ) > 0, "Yes", "No" )
)
To something simpler:
ADDCOLUMNS (
CROSSJOIN ( '#prodact', '#region' ),
"P#R", COMBINEVALUES("#",'#prodact'[product], '#region'[region])
)
I modified the DAX code of bridge table so as to leaving only the columns necessary for joins. The columns that I needed to be calculated I added as calculated columns. And that's it. It was by pure chance I found that out while experimenting with it.
For playing with bridge tables I recommend this Alberto Ferrari's article: https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/. It inspired me to solve the problem. What I get from the Alberto's text is that the functions VALUES and ALL are no good for bridge tables. He mentions issue of using CALCULATE function inside the bridge DAX tables. The function somehow is translated to mixture of ALL and FILTER functions. Instead of VALUE and ALL, use functions as DINSTINCT and ALLNOBLANKROW.
Working PBIX file. Hurray!
A quick and dirty solution is to creat to new versions of #product and #region by using VALUES. This is probably not the best way of doing it...
NewProduct = VALUES('#product'[product])
This new tables can be linked to #bridge with a 1:* relationship and thus can be used as a slicer on the dashboard.
Alberto has written about this on the sqlbi blog: Circular dependency sqlbi blog