rows
13 TopicsHow to add Calculated rows in a PBI Matrix
Hi all, I want to insert calculated rows to a power BI matrix. How do i add this? I can add calculated columns. But not sure how to structure the data and what are the functions to use to do this; 2018 Vol(KG) 100 Turnover 12,000 Cost (8,000) Gross Profit 4,000 Cost/KG 40 Gross margin 33.3% This is what the matrix should look like. Cost/KG and Gross margin are calculated using above rows. Please assist9KViews0likes1CommentShow total on all rows with DAX
Hi there, For our case we need to have a DAX measure that shows the total of a value on all rows. This needs to in dynamically so we figured that DAX should be needed. Here is an example: Value Total a 1 11 --> SUM(A:C) b 4 11 c 6 11 TOTAL 11 33 Does anyone know the DAX measure for this? Thanks!Solved7.1KViews0likes1CommentRANKX to do a TOPN - Lot of Data and Rows - Errors
Good Morning my Friends. Im having some problems and i Believe you guys are able to help! I have a List with over 80.000 Key IDs. Each Key ID represents a Travel. I Wanna do a TOPN List to show just the "more expensives" travels that were made... So I wanna be able to show 25, 50 and 100 differents Travels inside my Dashboard Table. So i tried to follow some steps and do First a RANKX, than a TOPN/TOPNValues Table, and finally a mesuare with a IF to do the LogicalTest between the TOPN Value Selected and my Value's Rank Position to show or not that value. Just like we can see in this video: https://www.youtube.com/watch?v=SsZseKOgrWQ The problem is, How i have more then 80.000 Rows when PowerBI tries to Rank it all in a Dashboard Table its keep Charging and Charging for a very Long times and never ends.... Until my Dashboard table presents an error.... Is there Any other option to do this? I believe that is important to say that i wanna Filter my values not just using the TOPN but using others Filters as which Sector has requested the Travel.... So If I Filter by Saying Sector A requested the Travel I Wanna show the 100s most expansibles Travels that Sector A requested.... If I Filter by Sector B, the same.... and if i Have no Sector Filter I wanna Show the 100s most expansibles Travels made by The Country(Sector is not important in this case) I thought about using an TOPN Function, to Get the first 5000 Values in a new Table and then do the RANKX there, with less Data and less Row(5000 vs 80.000). My fear is that : "What if some of My more Expansibles Travels of one of my Sectors is under those 5000 first Values?" I dont think its the ideal solution.... It most have something better.... If the Dashboards Table Filter were Dynamic it would be Perfect.... But how it is not if i use the Dashboards Table Filter i can only choose to Filter by one Constant Number always... And i wanna be able to change for Differents TOPN numbers(Filter by 20, 50, 100, or any other number I Prefer) ...Solved2.6KViews0likes8CommentsDisplaying a Row as Fixed, when it's value needs to be manipilated
*I have trouble converting the data type of Column Amount in Source ABC to Decial/Numbers for this tutorial(help needed), see data source:https://drive.google.com/file/d/1VZJv8sPPYPcLiRKyO1fkEqbcsX-dz10P/view?usp=sharing . PBIX:https://drive.google.com/file/d/1wfjbLI7nBLQU5-Qs5rGHOL2XP4uc0UR9/view?usp=sharing I am trying to include rows in a Dax calculation from a mapping table(Pivot) to a fact table(ABC). The DAX is going to look at specific rows and bring those forward. The big issue is some rows are not present in the Fact table. I also need those rows to be displayed but their values to be manipulated. An example is row "Interco capital returned", which is not in the Fact Table(ABC), it should display a fixed value of "678" TotalAmountForSelectedItems5 = CALCULATE( SUM('ABC'[Amount]), // Corrected Column Reference 'ABC'[Roll_Up_Function] IN { "Cash flow from ops - management", "Cash flow from trading", "Depreciation and amortisation", "IPEP expense", "Disposals & impairment of fixed assets", "Profit on disposal of pooling equipment", "Scrapped pooling equipment", "Impairment or valuation adjustment of pooling equipment", "Disposals or valuation adjustments of other fixed assets", "Other cash flow from trading adjustments", "Share-based payments expense", "Working capital mvts incl. provisions", "Working capital mvts excl. provisions", "Debtor movements", "Creditor movements", "Inventory movements", "Prepayment movements", "Provision movements", "Change in capex creditors", "Change in loss compensation balances", "Interco interest and guarantee fees", "Interco cash flows", "Interco royalties", "Statutory reallocations", "Internal restructuring", "Interco dividends Total", "Change in interco balances", "Change in interco recharge clearing", "FX on interco debt", "Interco capital returned" } ) amitchandak jpessoa8 lbendlin2.1KViews0likes2CommentsCalculated column returning the majority across a number of rows
Hello. I have my Purchase Line table detailing deliveries. Each delivery has it's own unique number but there can be multiple deliveries for each number (as little as 1, as many as 8). In the same table there is a Delivery Day column, so for each line there can be any of the following... Blank (not delivered) 1 (delivered on 1st day) 2 (delivered on 2nd day) 3 (delivered on 3rd day) 4 (delivered early) 5 (delivered late) I need to create a calculated column which identifies blank, 1 & 4 as 1 (or Day 1), 2 as 2 (or Day 2), 3 as 3 (or Day 3) and 5 as 5 (or Late) with the following condition - the majority eg. number of lines with a value greater than 50% gets the credit. So if there is one unique ID and Delivery Day column has five lines (deliveries), and 3 of them are Day 1 and 2 of them are Day 2, then Day 1 gets the "credit'. See example... Load No Delivery Day Desired Output L555111 1 1 L555111 1 1 L555111 1 1 L555111 1 1 L555111 1 1 L555222 2 2 L555222 2 2 L555222 3 2 L555222 3 2 L555333 1 1 L555333 0 1 L555333 0 1 L555333 0 1 L555444 1 1 L555444 1 1 L555444 1 1 L555444 2 1 L555444 2 1 In the event of a tie eg. L555222 which has two Day 2 and two Day 3 deliveries, then the earliest day (or lowest value) gets the 'credit' I have given this a go in Groups but that can't take into account differences in Delivery Days across the lines, also tried rank/topN and MAX in Measures but feel that the solution is probably either in a calculated column or a Custom Column in Query Editor, but this one is just beyond my capability in that regard. Any guidance appreciated on online resources that can help point me in the right direction to research this.Solved1.7KViews0likes6Commentsfilter one column in one table to another column in another table
Henlo, I am needing to add a measure that filters out data from my matrix. I am needing only rows returns that match this criteria ( {IM_ItemWarehouse.WarehouseCode} = {CI_Item.DefaultWarehouseCode} ) I know how I can do this in power query but I have other visuals that do not require the same filtering. Can someone help me with how I would create a measure to accomplish this? Oodles of thanks in advance! 🙂Solved1.7KViews0likes1CommentDax measure to compare dates in different rows based on a measure
This is my first time posting, so bear with me. I have a dataset like below: I have the following two measures that calculate running totals. These running totals change based on the current filter context (Category) slicer. Actual running total (Measure) = CALCULATE( SUM('Table1'[Actual]), FILTER( ALLSELECTED('Table1'[Date]), ISONORAFTER('Table1'[Date], MAX('Table1'[Date]), DESC) ) ) Baseline running total (Measure) = CALCULATE( SUM([Baseline]), FILTER( ALLSELECTED('Table1'[Date]), ISONORAFTER('Table1'[Date], MAX('Table1'[Date]), DESC) ) ) I need to create a measure that identifies "Days Delay" for each row. For each row I need to take the "Actual running total (Measure)", find the Max "Baseline running total (measure)" that is less than the "Actual running total (Measure)" and then compare the differences in dates. Let's take row "05 January 2019" as an example. Take "Actual running total (Measure)" = (8) Find Max "Baseline running total (measure)" that is less than "Actual running total (Measure)" = (5) Get the corresponding date = (03 January 2019) Compare (Datediff) with original Row Date (05 January 2019) = (-2) The big challenge is that the solution needs to be dynamic i.e. if I change the "Category" slicer, the measures need to recalculate and produce the relevant results based on the context of the slicer / filter. Any direction or help would be greatly appreciated.1.6KViews0likes0CommentsMultiple row and Column Add up (Remove Duplicates)
I am currently working on a project using a grading system and want to display total% of an individuals skillset. The grading system works using the below image (I've only used my own test ID but in the data set it is showing all 930). Scenario 1 = 10%, Scenario 2 = 20%, Scenario 3 = 30% and Task 1 + Task 2 both give 20% each resulting in the individual being 100% trained. The main issue with this is that the user can have multiple entries for each header, resulting in the total% being over 100% in some cases. Is there a measure that can be implemented to just look at each of these columns and just take one entry from each and ignore duplicates while adding up to a max of 100%? Happy to give more details.Solved1.3KViews0likes6CommentsTransformed table with new rows
Good day everyone. I need to make transformed table using data from next table: IDLE_ID START_DT START_TIME END_DT END_TIME IDLE_TYPE 122851 09.09.2019 05:57:00 01.10.2019 09:00:00 Planned 123111 01.10.2019 09:30:00 02.10.2019 17:00:00 Planned I need to make visualization like this (abridged example): IDLE_ID START_DT START_TIME END_DT END_TIME IDLE_TYPE 122851 09.09.2019 05:57:00 09.09.2019 24:00:00 Planned 122851 10.09.2019 00:00:00 10.09.2019 24:00:00 Planned 122851 11.09.2019 00:00:00 11.09.2019 24:00:00 Planned 122851 12.09.2019 00:00:00 12.09.2019 24:00:00 Planned 122851 13.09.2019 00:00:00 13.09.2019 24:00:00 Planned 122851 14.09.2019 00:00:00 14.09.2019 24:00:00 Planned 122851 15.09.2019 00:00:00 15.09.2019 24:00:00 Planned 122851 25.09.2019 00:00:00 25.09.2019 24:00:00 Planned 122851 26.09.2019 00:00:00 26.09.2019 24:00:00 Planned 122851 27.09.2019 00:00:00 27.09.2019 24:00:00 Planned 122851 28.09.2019 00:00:00 28.09.2019 24:00:00 Planned 122851 29.09.2019 00:00:00 29.09.2019 24:00:00 Planned 122851 30.09.2019 00:00:00 30.09.2019 24:00:00 Planned 122851 01.10.2019 00:00:00 01.10.2019 09:00:00 Planned 123111 01.10.2019 09:30:00 01.10.2019 24:00:00 Planned 123111 02.10.2019 00:00:00 02.10.2019 17:00:00 Planned I know, it looks really strange, but i need this visualization for easy count of idle for each day. Also first table was formed in DirectQuery, and i need not to change initial table. Any suggestions come useful. Best regards Alexandr963Views0likes2CommentsHow to sum each row?
Hello, I have a question. I want to add a new column to the table with summing up each row. How can I do it so it looks like the field highlighted in yellow? For some reason, I have difficulties with it... it's frustrating. I appreciate every help! With kind regards, KlaudiaSolved901Views0likes2Comments