dataset
4 TopicsPowerBI dataset simple relationship issue
Hello guys, I am unable to understand why I cannot create visuals with data from my two fact tables joined through a dimension table. The schema is described below, I joined the two tables through a dimension based on the same id. If I want to create a visual in which I pull attributes from Fact One and Fact Two, i get an error saying there is no valid relationship between the tables. I tried switching the cross filter direction to 'both' for both relationships: did not work. Tried to pull attributes from all three tables, thinking that maybe all three tables have to contribute to the visual for it to work. Same issue. The only way I can link the two tables in the same visual is by doing a many to many relationship between the two fact tables. What am I doing wrong? Also, I have a similar issue with products table where I am linking Fact Two to Product table (fact:many to product:one), then linking Product dimension to Product Options dimension (Product:one to Product Options:many). I cannot split the fact table sales data by Product Options. The only way to make it work is again, doing a many to many relationship between Fact Two and Product Options. Please help!659Views0likes2CommentsHow to resume Returns and dates
Hi, I've a extensive database with the following format: Date Nemo Fund Rent 1/1/2021 Nemo1 A 1% 1/1/2021 Nemo1 B 1% 1/1/2021 Nemo1 C 1% 1/1/2021 Nemo2 A 7% 1/1/2021 Nemo2 D 7% 1/1/2021 Nemo3 A 0% 1/1/2021 Nemo3 B 0% 1/1/2021 Nemo3 C 0% 1/1/2021 Nemo3 D 0% 2/1/2021 Nemo1 A 0% 2/1/2021 Nemo1 B 0% 2/1/2021 Nemo1 C 0% 2/1/2021 Nemo2 A 0% 2/1/2021 Nemo2 D 0% 2/1/2021 Nemo3 A 0% 2/1/2021 Nemo3 B 0% 2/1/2021 Nemo3 C 0% 2/1/2021 Nemo3 D 0% 3/1/2021 Nemo1 A 0% 3/1/2021 Nemo1 B 0% 3/1/2021 Nemo1 C 0% 3/1/2021 Nemo2 A -3% 3/1/2021 Nemo2 D -3% 3/1/2021 Nemo3 A 0% 3/1/2021 Nemo3 B 0% 3/1/2021 Nemo3 C 0% 3/1/2021 Nemo3 D 0% 4/1/2021 Nemo1 A 7% 4/1/2021 Nemo1 B 7% 4/1/2021 Nemo1 C 7% 4/1/2021 Nemo2 A 3% 4/1/2021 Nemo2 D 3% 4/1/2021 Nemo3 A -9% 4/1/2021 Nemo3 B -9% 4/1/2021 Nemo3 C -9% 4/1/2021 Nemo3 D -9% I've daily returns for each nemotecnic in diferent fund (the nemos always have the same return in each fund per day, but not all funds have the same nemos). I would like to resume the returns != 0% with the date of that return someting like this: Nemo Rent1 Date1 Rent2 Date2 Rent3 Date3 Nemo1 1% 1/1/2021 7% 4/1/2021 Nemo2 7% 1/1/2021 -3% 3/1/2021 3% 4/1/2021 Nemo3 -9% 4/1/2021 Does anyone have a easy way to do this on Power BI?Solved816Views0likes2CommentsALL function not working in PBI report, but works in PBI Dataset
Hello everyone, My issue: I have a PBI report connected to a PBI dataset. The Total Headcount formula using the ALL function on a field works in the dataset - when I use that exact field as a slicer it is completely ignored -, but does not work in the PBI report which is connected to it. More details: In the dataset, I have HR data (Terminations and Headcount). The thing is that for Terminated people, I have termination type (Involuntary, Voluntary and Unknown) and for Headcount records the Termination Type will always be BLANK. All data is appended in a single table. I wrote a Total Headcount formula using the ALL function based on Termination Type -> I want to use a "Termination Type" slicer to filter the sum of terminations by voluntary/involuntary/unknown, but these terminations must be divided to the Total Headcount irrespective of the Termination Type (as the Termination Type will always be BLANK) must not interact with the "Termination Type" slicer Total Headcount = VAR TotalHC = CALCULATE ( SUM ( 'HR Metrics'[Measure - Preview Count] ), KEEPFILTERS ( 'HR Metrics'[Measure Type] = "Headcount" ), 'HR Metrics'[Employment Status] = "Active", ALL ( 'HR Metrics'[Termination Type] ) ) RETURN IF ( ISBLANK ( TotalHC ), 0, TotalHC ) All works wonders in the dataset, see the below screenshots: However, the exact same things do not work in the PBI report which is connected to this dataset, see below the weird behaviour that I get. Normally, when I select anything in the "Termination Type" slicer, the headcount value should be as above. However, as you can see, it is not. I am confused why I even get a headcount value <> 0 when I select a value in Termination Type (as mentioned, the Termination Type for headcount will always have BLANK as vlaue) Any help in this matter will be greatly appreciated. Let me know if you need more info.Solved839Views0likes2Comments