I am loading an Excel file, in which it has 43 rows, all the rows are identical. This is the only file I'm loading and there are no connections relationships in the model whatsoever.
When I plot my data into a table visual, and choose not to summarize any of my fields, Power BI still shows me one row. While if I change any of the field to do a count of it, it shows me correctly that I have 43 rows. I need to be able to see all the 43 rows in my table.
Why is Power BI summarizing my data even if I command it not to do so?
Am I missing something simple?
Input table as seen in Power BI data tab:
The visual I'm trying to create:
The table visual in Power BI behaves similar to a Pivot Table in Excel.
W/o an aggregation defined, the "Values" fields behave like "Rows" in a Pivot Table and you will only see distinct items or distinct item combinations. You have 43 identical records, hence it is represented as one row in the visual.
With an aggregation defined (Sum, Count, ...) the field behaves like "Values" in a Pivot Table, and you get the result of that aggregation, filtered by the distinct items/combinations to the left, which is again one row in your case.
If you just want to show all the records in a table visual, you'll have to make them unique. The easiest way to achieve that is by adding an index column in PowerQuery and then also showing that index in the table visual.
However, this is not exactly what Power BI is made for and you are probably better off by switching to something like PowerPoint instead.
And btw., newer show sceenshots in stackoverflow, always provide sample data instead.
Related
I am a PowerBi beginner and would like to know if it is possible to create a table report that behaves like explained in the attached picture (according to the fact table I have).
I tried to do it with a DAX measure using the following formulas but it does not work as I wish :
CALCULATE(SUM('Fact'[Invoice]),'Fact'[Customer] = SELECTEDVALUE('Fact'[Customer]))
CALCULATE(SUMX('Fact','Fact'[Invoice]),'Fact'[Customer]=SELECTEDVALUE('Fact'[Customer]))
The slicer does not filter the table in order to get all the product in the table even if the customer did not buy one.
Is it possible to do it ?
Many thanks
I know similarly named topics exist but I spent hours looking for the answer to something which i feel must be easy to do.
I have a table Visual in Power Bi and need to get a row count which would adjust as users set filters and use slicers.
The columns in the table don't have one level of hierarchy (otherwise a measure with DISTINCTCOUNT would do the trick), see an image of my table - I need to count rows in this table (21).
I couldn't find any way to directly refer to the Table Visual in DAX so simple COUNTROWS() wasn't useful. I tried to create a measure using various DAX expressions i found, e.g. recreate the table in DAX using CALCULATETABLE and have it use active filters, i failed there...
I also created an index variable on the physical/dataset table and tried to add it to the visual table and summarize it in some way (the column "Counter" in the table) - it didn't work, didn't give me the number of rows in the visual table but gave the number of rows in the physical/database table.
Please could you help me how to do this...
You won't really be able to access the table visual in the way you're thinking, but as long as you know how it comes together, that should be just as good.
CountSummaryRows =
CALCULATE(
COUNTROWS(SUMMARIZE(Table1, Table1[A], Table1[B], Table1[C], Table1[D])),
ALL(Table1)
)
This measure will aggregate to the level of your A,B,C,D columns, then count the total. ALL(Table1) just ensures you get the grand total, so every row should show as 21, but at least you'll have a handle on that summary table count.
It looks like Power BI is doing some form of SQL Union logic when combining data from two or more tables on a table visual.
In the image above you can see there are only two rows displayed. Within the data however there are in fact 4 rows, and all are valid to me. When I add another column that is distinct per row, it shows the data I expect. See image below:
I have two questions, can I change this default behavior?
If not, can I hide a column within a table visual while still having its data affect the display? That OrderDetailKey has no value to my users, which is why I didn't display it in the first place.
I am new to power bi and I am working on visualisations but I am having some trouble how do I get distinct values in a slicer.
I am wondering how does one remove duplicates from a slicer filter using dax or is their a simpler way.
I am using excel as my data source.
I am using a column called Period which has data like the following.
12
13
14
15
15
But there are duplicates in the source data which I dont no how to filter only on the slicer.
The slicer will only display DISTINCT values BUT if you have duplicate values in your source data you'll need to account for it. You can do this by creating a simple measure on whatever field you are slicing using some logic or built in functions like DISTINCTCOUNT, DISTINCT, VALUES etc..
I'm trying to figure out how to get a measure to adhere to the filter set by a slicer in Power BI.
My DAX query is: Block Time Cost = SUMX( FILTER(v_Invoice_Line_Items, v_Invoice_Line_Items[IV_Item_RecID]=9), v_Invoice_Line_Items[billable_ext_price_amount])
I know very, very little about DAX so my initial query may be way off base.
It calculates as I expect, but when filter with a date range silcer the value does not update as expected or at all.
I'm pulling my data from two views in the same database, v_Invoice and v_Data_Combined. I have a page level filter on the row Record_Description to limit the data to the types I'm looking for and the measure pulls it's data from rows in the v_Data_Combined view.
The rows in v_Invoice are below.
A sample copy is here.
and the rows for v_Data_Combined, if you click they will enlarge.
A sample copy is here.
I have no relations set between the views.
How can I have a measure adhere to slicer filters?
The slicer has to be on the same table as the measures you're filtering, or on a table related to that table. If your slicer is on a column in v_Invoice and your data is from v_Data_Combined - and the 2 tables are unrelated in Power BI, the slicer from one table will have no effect on the data from the other table.
Without sample data (which can be fake data), it's hard to make further recommendations.
However, if the two tables you have aren't really related to each other, then I would recommend exploring the possibility of "lookup" tables. E.g. if you have Company_Name in both tables, then you might add a 3rd table that is a unique list of companies (their name, address, etc). Then, when you want to slice by company you would slice on this 3rd table. That slicer will then filter both related tables (without having to have the tables related to each other).
You can read more about data modeling in Power BI, and how to design lookup tables, here: https://powerpivotpro.com/2016/02/data-modeling-power-pivot-power-bi/