hints & tips
10 TopicsColouring measure not working properly
This is related to my last question I want use a measure comparing against monthly figures. The number of months is coming from a slicer. The used measures are.... [# Contracts] = COUNTROWS(tblFacts) [ØContractsMonthly] = var tbl = ADDCOLUMNS( VALUES( calendar[YYYYMM] ), "Contracts", [# Contracts] return AVERAGEX( tbl, [# Contracts]) [ColumnColorContracs]= var check = [# Contracts] var limit = [ØContractsMonthly] return SWITCH( TRUE(), check >= limit, "Green", "Red" ) [# Contracts] is used as Value for Y-Axis, calendar[YYYYMM] is on X-Axis, Reference Line is using [ØContractsMonthly] I have figured out the following: Using a constant value (e.g. 1500) instead of [ØContractsMonthly] makes colouring work correctly. How can this be? How to make it dynamically? Any help or hint or support is appreciated. thx in advance ThomasSolved718Views0likes2CommentsJoining Two Tables
Hello Everyone, I have the two following tables: Task Table: Project Table: In the task table, I want to have the last column (Status). It is not originally there, it's part of project table. I want to do a join between the two tables based on Projectid, but I haven't been successful so far with DAX. Could someone guide me? Thanks in advance.Solved1.4KViews0likes3CommentsProper Calculation of Facts/Values from Dimensional Table
Source ( Download Here ) Userstory: Imagine you have big star shema model and important values/facts in dimensional Tables. And you don't want to mess up your fact table with multiple low cardinality columns. Question: How to proper handle these dimTable facts/values? Simplified Example: Question: How to get DESIRED YearVolume (because by default it gives 2200 (Totals) in each cell)?Solved1.7KViews0likes5CommentsI need to create a table with the first log, given some conditions
Hellor I need some help with this problem: I have many users and each one has made, at least, one purchase at some point, I need to know the date of the first purchase they have made to count the amount of first purchaces made in a month. OG table User purchase_date A 2023-02-01 A 2023-02-14 A 2023-03-29 B 2023-02-10 C 2022-12-23 C 2023-07-04 C 2023-09-15 First purchase table user "first_purchase" A 2023-02-01 B 2023-02-10 C 2022-12-23 Probably this is not the best way to do this, if someone can guide me to something I can study to achieve this goal is very appreciated.Solved565Views0likes1CommentField Parameters, NOT Calculation Groups. SELECTEDMEASURE() functionality without Tabular Editor
FIELD PARAMETERS or CALCULATION GROUPS? Both are used to dynamicaly change fields/measures in your report/visual. I would recommend to start with Field Parameters, as far as: It's more modern feature. Covers Calculation Groups functionality. Don't need external tools (like Tabular Editor). You could use it together with over fields/measures. Supports individual values columns sort in matrix (How to sort values in pivoted columns) My favourite tutorial video for this topic by AlbertoFerrari : Fields parameters in Power BI Just one problem: how to pass selected measure as variable for another measure? Example: I have two almost identical measures: YTD Sales = CALCULATE([Sales], DATESYTD('Calendar'[DateKey])) and YTD Quantity = CALCULATE([Quantity], DATESYTD('Calendar'[DateKey])) But I want to reduce amount of measures and use something like YTD = CALCULATE([Melected], DATESYTD('Calendar'[DateKey])) //[Melected] - Measure sELECTED // - measure that could be equal [Sales] or [Quantity] depending on our slicer single choice/election Here is amazing video by pleblanc dedicated to this topic: REDUCE the # of measures with Calculation Groups In Power BI Question: is it possible to get SELECTEDMEASURE() functionality without Tabular Editor? Answer: Yes Details: Desired functionality: How To, a 5-step guide (the initial two steps being the focus of this article) 1) Let's create _MeasureSelected table and use it's [Melected Name] column as single choice slicer in our report: 2) Create [Melected] measure, that will be equal [Sales] or [Quantity] based on [Melected Name] slicer single choice: 3) Create [Melected] dependent measures like: 4) Create Field Parameter with list of measures: 5) Create matrix and Enjoy result P.S. Source file (Download)1.7KViews0likes0CommentsDistinctcount based on values in another column of same table – DAX for measure?
Hello Experts, I am new to Power BI. Could you please help me with below? So below is my simplified table resource_name | scan_date | Scan_time | server selected | ABS 06-06-2023 1:00:00 AM SQL BCS 06-06-2023 1:00:00 AM SQL ADB 08-06-2023 8:00:00 AM Oracle So here i need to find out the concurrency issue. As above you can see for resource_name "ABS" & "BCS" the scan_date, scan_time and server_selected are same. So in this scenario i have to highlight this and expecting a output like below either as measure or calculated column. output required: Scan_date | Concurrent issue | 06-06-2023 2 So I have to take count of distinct resource_name which have all same details Thanks in advance!!Solved750Views0likes2CommentsNO CALCULATE theory test1
Curious about Greg_Deckler NO CALCULATE theory (video, article) Looks very atrractive, but needs to test. For example: I want to rank Date based on all subgroups mentioned in matrix Rows section except Date. Examples So, it means that I want to avoid explicit use of Type and subType columnnames in measures/calculations My DAX measures (NB! without IF statements these measures makes cartesian product for subType (details)): lastDate2 = IF( NOT ISEMPTY(tstTable), CALCULATE( LASTDATE(tstTable[Date]), REMOVEFILTERS(tstTable[Date]) ) ) rnkDate2 = VAR t = CALCULATETABLE( VALUES(tstTable[Date]), REMOVEFILTERS(tstTable[Date]) ) RETURN IF( NOT ISEMPTY(tstTable), RANKX( t, LASTDATE(tstTable[Date]) ) it explicitly uses CALCULATE and CALCULATETABLE QUESTION: how to get the same functionality without explicit use of these functions? Data Model: Source file DownloadSolved2.8KViews0likes3CommentsHave a card display a different measure depending on slicer
Hi all, I currently have a dashboard with 4 Dimension (Nationwide, Race, Age, Marital Status). The main 3 KPI's (PTI ratio, YoY PTI Ratio and DoD PTI Ratio) are linked with the "Nationwide Dim" and as such will slice and change depending on that visual. I want the the KPI's to also change with the other 3 Dims, but i wanted to display on the same card.... i.e For example - when you click on Hispanic, I want the YoY main KPI to change to .33% and DoD main KPI should say 14.32%. Heres a picture of the dashboard as well as a link to it. PBIX FILE: https://nzuriico-my.sharepoint.com/:u:/g/personal/tariq_nzuriico_onmicrosoft_com/Ec7L3i68XSFCgA9vjFSQgekBbuM__GAd07BhbRAkmCNqhA?e=orQBig PowerBI Link https://app.powerbi.com/view?r=eyJrIjoiNmYyMjQ5OGYtNjljMC00MzJiLThiMDMtMTBmMGQ5YzdjMjRiIiwidCI6ImYxY... I've could use the Mutlicard option but the instructor rejected that option and wants only one number to display on each card.669Views0likes2Comments